-
1. Re: Struts Plugin with EJB 3.0
manica May 24, 2005 7:13 AM (in response to mduffy_lists)You can use a ServicePOJO to accomplish this. Simply place the ServicePOJO in the ejb3 archive, create a dependency on any specific EJBs that you need (or just dependency inject them using the @EJB annotation), then you can use the management lifecycle methods to accomplish what you want.
I'm currently using this method to bootstrap data and other system initialization routines. There are helpful examples in the tutorial.
Darin -
2. Re: Struts Plugin with EJB 3.0
bill.burke May 24, 2005 9:10 AM (in response to mduffy_lists)I'm not familiar with Struts plugins. Is this something you initialize in Servlet initialization?
-
3. Re: Struts Plugin with EJB 3.0
mduffy_lists May 24, 2005 6:51 PM (in response to mduffy_lists)Thx.
I see the Service POJOS tutorial; however, when I look in the most recent editions of the EJB 3.0 specs, I do not see a reference for @Service. Can you tell me where the reference is?
Mike -
4. Re: Struts Plugin with EJB 3.0
manica May 24, 2005 10:35 PM (in response to mduffy_lists)It's an extension to the spec. If you are averse to this, you can accomplish the same thing using MBeans, but you'll loose the IoC and simplicity of ServicePOJOs.
Darin -
5. Re: Struts Plugin with EJB 3.0
bill.burke May 24, 2005 10:44 PM (in response to mduffy_lists)Again, so is your problem that Servlet initilalization happens before EJB initialization?
-
6. Re: Struts Plugin with EJB 3.0
mduffy_lists May 25, 2005 12:00 PM (in response to mduffy_lists)Yes, it appears the problem is " that Servlet initilalization happens before EJB initialization".
Mike -
7. Re: Struts Plugin with EJB 3.0
mduffy_lists Jun 2, 2005 1:54 AM (in response to mduffy_lists)Does anyone have a possible work around for this?
Thx.
Mike -
8. Re: Struts Plugin with EJB 3.0
bill.burke Jun 2, 2005 10:14 AM (in response to mduffy_lists)I have created a JIRA task for this. We probably won't get to this for a bit as we're working on other bugs/features at the moment. If you find a solution, let me know.
http://jira.jboss.com/jira/browse/EJBTHREE-191
if you want to listen for when it is fixed.