This content has been marked as final.
Show 5 replies
-
1. Re: Where do helper classes go?
bill.burke Oct 18, 2005 11:59 AM (in response to dornus)in jboss, i believe you can put it within a jar within the EAR, in the ejb jar file, or even in the par.
Java EE 5 EAR format has an EAR/lib directory which should alleviate this problem. -
2. Re: Where do helper classes go?
dornus Oct 18, 2005 12:09 PM (in response to dornus)If I put it in the ejb3 jar file as you suggested, does it matter that it doesn't have an interface? I want to be able to create new instances of the Bean.
MyBean myBean = new MyBean();
I thought everything in the ejb3 needed an interface so it could handle the pooling of objects? -
3. Re: Where do helper classes go?
dornus Oct 18, 2005 12:13 PM (in response to dornus)Maybe I'm not understanding your response well.
Are you saying to do this?MyEar.ear |--MyEJB3.ejb3 | |--MyHelperBeans.ejb |--MyPar.par |--MyWar.war
Where the helper beans go in their own .ejb (not .ejb3) file. Then that ejb jar file is included inside the ejb3 jar at the root level? -
4. Re: Where do helper classes go?
dornus Oct 18, 2005 3:43 PM (in response to dornus)Also, if I put it in the .ejb3 jar file and don't mark it as @Stateful and make an interface for it then I will get a
javax.naming.NameNotFoundException: myPackage.myHelperBean not bound
error. -
5. Re: Where do helper classes go?
dornus Oct 19, 2005 9:35 AM (in response to dornus)OK, I put the helper classes in their own jar file at the root level of the ear
Then I modified the application.xml to use it<module> <java>MyHelperClasses.jar</java> </module>
and now everything works fine.