-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am not able to use Dependency Injection to inject the EJB session beans into the ZK controller (Java class that extends GenericForwardComposer). Also JNDI lookup doesn't work with the local interfaces of the EJB stateless beans.
The only way to get the session beans is using JNDI and looking up their Remote interfaces. But using Remote interfaces and RMI to transport objects between the business tier and ZK (even though they both are on the same application server) is very expensive and not suitable for the enterprise applications.
Is there any way to use JNDI and look up the local interfaces of the EJB session beans or inject them into the ZK controller?
Thank you in advance.
My frameworks are:
Java EE 6
EJB 3.1
Glassfish 3.0
ZK 5.0.2
Hi Masum,
the keyword is CallByValue. See the difference between servers server\default and server\standard, particularly check the conf and deployers subdirs for this keyword. If you use "default" server, then CallByValue=false and you should be able to use JNDI local calls. At least I am using them in JBoss 5.1.0GA. The "standard" server should behave more like JEE spec.
Hi xmedeko,
Now I trying to EJB3 with Jboss and zk application . I have a appropriate solution from zk . but it works good . Here I can not use local interface of ejb3 session bean.
so , I want to use your feature and jboss .
pls give me a link or any suggestion .
Thanks
Masum
Deploy the WAR and EJBs in the same EAR, then you should be able to use local EJB interface.
If I remember it right, the JEE spec. says, that you have to use remote EJB interface when you have EJB and WAR as a separate deployment in the same server. JBoss does not stick to this JEE spec., so you can use EJB local interface, even when it is deployed separately. (Particularly, it depend on the JBoss configuration, let me know, if you would like migrate to the JBoss and use this feature, I'll give you a link how to configure JBoss.)
Asked: 2010-06-21 22:06:32 +0800
Seen: 1,107 times
Last updated: Sep 15 '10