-
1. Re: Ejb in Jboss 7.0
wdfink Nov 20, 2012 2:58 PM (in response to ashvish)I never tried such approach, but maybe it works if you place the jboss-deployment-structure.xml in the META-INF of the ear file and set export=true, in taht case all subdeployment ejb.jar will have the same classloader for this classes.
-
2. Re: Ejb in Jboss 7.0
ashvish Nov 21, 2012 9:00 AM (in response to wdfink)I have tried adding to a sample ejb-jar but it doesn't seem to work. When I start the server I see the line JBAS018559: Deployed "example.jar" but there are no jndi bindings to be seen. It seems to me that the ejb-jar.xml and jboss.xml inside the example.jar is not having any effect.
-
3. Re: Ejb in Jboss 7.0
wdfink Nov 21, 2012 9:27 AM (in response to ashvish)Do you use ejb-2.0 descriptors? AFAIK only ejb-2.1 (an later) will work in AS7
-
4. Re: Ejb in Jboss 7.0
ashvish Nov 21, 2012 11:42 PM (in response to wdfink)Finally I have been able to deploy the ejb by adding jboss-ejb3.xml as well as jboss-deployment-structure.xml to the ejb jar's meta-inf folder. What I do not understand is how come the bean is getting deployed by adding jboss-ejb3.xml, theoretically it is just to overide whatever is given in ejb-jar.xml, so without that also the bean should have been deployed. Now I am also looking at how I can give a custom jndi name because the jndi name given in jboss.xml file is having no effect.
-
5. Re: Ejb in Jboss 7.0
wdfink Nov 22, 2012 2:10 AM (in response to ashvish)Set individual JNDI (mapped) names is not supported in AS7.1
-
6. Re: Ejb in Jboss 7.0
ashvish Nov 22, 2012 3:56 AM (in response to wdfink)That means we would have to change all the client classes where jndi look up is being done? I wonder why custom jndi is not supported?
-
7. Re: Ejb in Jboss 7.0
wolfc Nov 22, 2012 4:52 AM (in response to ashvish)You can do this by creating a self-reference. Either with an annotation or in ejb-jar.xml.
(Kudos to Stian Thorgersen)