-
1. Re: EJB 3.1 war packaging in JBoss 6 M3 and M4
jaikiran Aug 3, 2010 11:20 AM (in response to william.drai)1 of 1 people found this helpfulWilliam Draï wrote:
The status of this EJB 3.1 war packaging feature in JBoss 6 milestones is not very clear. It has been announced in some blog post but the JIRA is still open. Is this supposed to work out-of-the-box or is there something to configure ?
It's supported since JBoss AS 6.0.0.M2 http://community.jboss.org/wiki/EJB31inAS600M2
William Draï wrote:
Hi all,
I've tried to build a simple war containing annotated EJB classes in WEB-INF/classes but the EJBs are not deployed and they don't appear in the global JNDI view.
Global JNDI view isn't yet (completely) supported in 6.0. The beans however will still be bound to JNDI, but won't be following the EJB3.1 global jndi name syntax.
-
2. Re: EJB 3.1 war packaging in JBoss 6 M3 and M4
william.drai Aug 3, 2010 12:34 PM (in response to jaikiran)Thanks for the quick response.
The EJB does not appear at all in the JNDI view with any name, not even the JBoss naming convention module/beanName/local.
It seems that EJBs deployed from wars are not available from JNDI at all. I guess they can only be used with @EJB.
-
3. Re: EJB 3.1 war packaging in JBoss 6 M3 and M4
jaikiran Aug 3, 2010 1:35 PM (in response to william.drai)William Draï wrote:
It seems that EJBs deployed from wars are not available from JNDI at all. I guess they can only be used with @EJB.
For @EJB to work they have to be available in JNDI
I suspect it's a problem with your web.xml. What does it look like? Does it use the 3.0 version xsd?
-
4. Re: EJB 3.1 war packaging in JBoss 6 M3 and M4
william.drai Aug 4, 2010 6:00 AM (in response to jaikiran)Right, I copy/pasted the wrong web.xml. It works fine now with version="3.0".
As you said, the standard JEE6 naming convention is not supported.
In this case of war packaging, the global name is "ejbname/local" (was earname/ejbname/local in the case of ear packaging).
I wonder what would happen if the same EJB is deployed in different wars ?
Thanks.
-
5. Re: EJB 3.1 war packaging in JBoss 6 M3 and M4
jaikiran Aug 4, 2010 6:37 AM (in response to william.drai)William Draï wrote:
I wonder what would happen if the same EJB is deployed in different wars ?
Naming conflicts Unless you name that EJB differently.
-
6. Re: EJB 3.1 war packaging in JBoss 6 M3 and M4
william.drai Aug 4, 2010 7:17 AM (in response to jaikiran)Of course
This default naming is not a very good idea imho. It would be better to qualify this name with the war name (as in the standard naming convention), but I guess if it was so easy you would probably have also implemented the standard naming .
This is far from critical for now, hopefully this will be fixed in the RC.