Skip to main content

Calling EJB 3.0 Beans from Remote Client...

11 replies [Last post]
vajav
Offline
Joined: 2005-07-17
Points: 0

Hi,

I found this page ( https://glassfish.dev.java.net/javaee5/docs/DG/beakt.html#beakw ) that describes what to do when you want to call en EJB 3.0 Bean...

However Netbeans doesn't offer any support with the application-client.xml or the sun-application-client.xml files (the later one isn't even part of the project)

Is there any howto on what to put in this file, or maybe a tool to guide me through this?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Lukas Jungmann

oops, I hit send too early, sorry :(

glassfish@javadesktop.org wrote:
> Hm... I need to deploy the full enterprise project... not just the application client *g*
>
> now it works... thanks!

great, good to know :)

>
> but how do i run the client outside of netbeans? (let's assume the EJBs are already deployed somewhere, and I want to start the client to do something...)

you have two options:
1) point a browser on a computer from which you would like to run a
client to specific URL - you can find it in GlassFish'es admin console
-> apps -> ears -> your app -> launch action on the appclient component
- the client will be started using Java WebStart

2) run $GF_HOME/bin/package-appclient script, move the generated file
(appclient.jar) and *Client.jar from $PROJECT_HOME/dist to the target
system, unzip appclient.jar there and run 'appclient -client
*Client.jar' from a command line there

--lj

> [Message sent by forum member 'vajav' (vajav)]
>
> http://forums.java.net/jive/thread.jspa?messageID=229385
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

ITVGuy2000

I suggest you download the JEE5 tutorial and try the demos there. They are
instrumented to work with NetBeans, and for me have given enough information
to get started. The tutorials can be found here
(http://java.sun.com/javaee/reference/tutorials/). Once open the online
version, click download bundle. The sections on EJB's is short,
straightforward, and the code examples simple. If you are able to run the
applications from the examples directory with NetBeans at least you will
know the basic setup and have confidence that it at least works with your
configuration.

ITVGuy2000

glassfish wrote:
>
> that's exactly what I have done... and I get a NullPointerException...
>
> Maybe one of you has a EJB 3 demo app using glassfish for me as a
> reference?
> [Message sent by forum member 'vajav' (vajav)]
>
> http://forums.java.net/jive/thread.jspa?messageID=229368
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>

--
View this message in context: http://www.nabble.com/Calling-EJB-3.0-Beans-from-Remote-Client...-tf4212...
Sent from the java.net - glassfish users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Lukas Jungmann

Hi,

glassfish@javadesktop.org wrote:
> Hi,
>
> I found this page ( https://glassfish.dev.java.net/javaee5/docs/DG/beakt.html#beakw ) that describes what to do when you want to call en EJB 3.0 Bean...
>
> However Netbeans doesn't offer any support with the application-client.xml or the sun-application-client.xml files (the later one isn't even part of the project)

Which version of NetBeans? Do you use Call EJB, Use DB etc. actions from
editor's context menu? I think I fixed some bug in this area for 5.5.1...

--lj

>
> Is there any howto on what to put in this file, or maybe a tool to guide me through this?
> [Message sent by forum member 'vajav' (vajav)]
>
> http://forums.java.net/jive/thread.jspa?messageID=229336
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

vajav
Offline
Joined: 2005-07-17
Points: 0

i am using nb 5.5.1 and there is no use ejb, just call

Lukas Jungmann

glassfish@javadesktop.org wrote:
> i am using nb 5.5.1 and there is no use ejb, just call

check http://www.netbeans.org/kb/articles/appclient-entappclient.html,
please

--lj

> [Message sent by forum member 'vajav' (vajav)]
>
> http://forums.java.net/jive/thread.jspa?messageID=229342
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

vajav
Offline
Joined: 2005-07-17
Points: 0

the page does not exist...

Lukas Jungmann

comma is not part of that link, it should be just:
http://www.netbeans.org/kb/articles/appclient-entappclient.html

glassfish@javadesktop.org wrote:
> the page does not exist...
> [Message sent by forum member 'vajav' (vajav)]
>
> http://forums.java.net/jive/thread.jspa?messageID=229358
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

vajav
Offline
Joined: 2005-07-17
Points: 0

that's exactly what I have done... and I get a NullPointerException...

Maybe one of you has a EJB 3 demo app using glassfish for me as a reference?

Lukas Jungmann

glassfish@javadesktop.org wrote:
> that's exactly what I have done... and I get a NullPointerException...
>
> Maybe one of you has a EJB 3 demo app using glassfish for me as a reference?

You can try Customer CMP sample in the IDE (new project -> samples ->
enterprise) - you only have to go to the EAR project's properties ->
run, select appclient there and invoke run on the ear project, not on
the appclient one

--lj

> [Message sent by forum member 'vajav' (vajav)]
>
> http://forums.java.net/jive/thread.jspa?messageID=229368
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

vajav
Offline
Joined: 2005-07-17
Points: 0

Hm... I need to deploy the full enterprise project... not just the application client *g*

now it works... thanks!

but how do i run the client outside of netbeans? (let's assume the EJBs are already deployed somewhere, and I want to start the client to do something...)

Lukas Jungmann

glassfish@javadesktop.org wrote:
> Hm... I need to deploy the full enterprise project... not just the application client *g*
>
> now it works... thanks!

great, good to know :)

>
> but how do i run the client outside of netbeans? (let's assume the EJBs are already deployed somewhere, and I want to start the client to do something...)

you have two options:
1)

> [Message sent by forum member 'vajav' (vajav)]
>
> http://forums.java.net/jive/thread.jspa?messageID=229385
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net