users@glassfish.java.net

Re: calling an EJB from a app-client

From: <glassfish_at_javadesktop.org>
Date: Sun, 13 May 2007 19:21:16 PDT

Yes, it's the law called the Java EE spec! Refer to section EE 9.4 which states:

"Injection is also supported for the application client main class."

This has come up in the forum a few times earlier.

One approach you can use is to declare the reference private (as you have) and define a static getter method on the class. Then the other classes in your client can fairly easily use the injected reference by invoking the static getter on your main class.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=216686