users@glassfish.java.net

Re: Java Persistence API

From: Sahoo <Sahoo_at_Sun.COM>
Date: Fri, 20 Feb 2009 11:29:07 +0530

People can write what they like. It depends on what you want to follow.
It is quite simple and straight forward to write standalone Java clients
that talk to EJBs in GlassFish. Look at a concrete example here:

http://weblogs.java.net/blog/ss141213/archive/2005/12/using_java_pers.html

That application has two kinds of EJB clients: one is a servlet calling
the remote EJB. Another is an appclient calling the EJB. Download and
run the application.

I understand it does not exactly meet your needs where in you don't want
to package the appclient along with the EJB jar. In such a case, all you
need to do is to specify mappedName attribute in your @EJB in the client
code. The mappedName is the JNDI name of the EJB which defaults to
remote business interface name.

Sahoo

glassfish_at_javadesktop.org wrote:
> Hi Sahoo,
>
> I have found some webs about my issue.
>
> Here is the first,
>
> http://markmail.org/message/wmzhxvv4dr6uwg5d
>
> In this case the client is a Servlet and you can call
> the EJB from a local and remote machine
>
> The second is,
>
> http://www.ensode.net/glassfish_rich_ejb_clients.html
>
> It explains that it is not easy to create a stand-alone client,
> for that app we know, to call an EJB. But you can use Swing to
> do it.
>
> I have been trying it from evening to quite late in the night on
> (Europe) Spain time and I did not get it.
>
> Thanks for your kind help,
> Jose Alvarez de Lara
> [Message sent by forum member 'josealvarezdelara' (josealvarezdelara)]
>
> http://forums.java.net/jive/thread.jspa?messageID=333042
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>