[jboss-user] [EJB 3.0] - Re: NullPointerException in JavaEEComponentHelper with JBoss
japase
do-not-reply at jboss.com
Fri Apr 24 01:36:10 EDT 2009
Hi,
As suggested I've created a new topic regarding the EJB injection in web services (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=154200).
I've also tried to test different configurations to surround the main problem (I have now a smaller application, but still build upon our framework, which seems behave in the same way as the "big" one, ifsapp.ear; we've also got a newer build of JBoss 5.1 through Red Hat support: 5.1.0.CR1; could it be of interest to get the log files from this version?).
But during my tests I found it totally impossible to deploy EJBs with mutual dependencies:
| @Stateless
| public class AStatelessSessionBean implements AStatelessSession
| {
| @EJB
| //@EJB(mappedName="ifssimpletest/BStatelessSessionBean/local")
| private BStatelessSession bean;
|
| @TransactionAttribute(TransactionAttributeType.REQUIRED)
| public String sayHello( String name )
| {
| return bean.sayHello(name);
| }
|
| public String greetingPhrase()
| {
| return "Hello there";
| }
| }
|
| @Stateless
| public class BStatelessSessionBean implements BStatelessSession
| {
| @EJB
| //@EJB(mappedName="ifssimpletest/AStatelessSessionBean/local")
| private AStatelessSession bean;
|
| @TransactionAttribute(TransactionAttributeType.REQUIRED)
| public String sayHello( String name )
| {
| return bean.greetingPhrase() + ", " + name + "!\n";
| }
| }
|
I've tested with and without 'mappedName'; I've also tested to pack both EJBs to a single jar file - nothing helps (I have a very simple test application with two EJBs as above and one servlet calling one of the EJBs - this application works perfectly on both GlassFish 2.1 and webLogic 10.3).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226445#4226445
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226445
More information about the jboss-user
mailing list