-
1. Re: EJB initialization
jaikiran Aug 25, 2007 10:24 AM (in response to edwiles)"edwiles" wrote:
1. How can we get the bean to initialize when JBoss starts up?
As far as i know, there isnt a direct way of doing this.
Have you checked this section in the JBoss guide which mentions about scheduling tasks using JMX http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch10.html#ch10.sched.sect -
2. Re: EJB initialization
darretta Aug 28, 2007 3:24 PM (in response to edwiles)>> How can we get the bean to initialize when JBoss starts up?
This may be a non-standard means to doing this, but we added a few servlets on our persistence layer to automatically start up and initialize timer tasks. Maybe this could solve your issue? -
3. Re: EJB initialization
edwiles Aug 29, 2007 4:22 AM (in response to edwiles)Thanks for the replies. For the scheduler we ended up using a Service POJO bean which is always a singleton. Then we used our existing web service bean simply as an interface into that. Seems to work!
See http://docs.jboss.org/ejb3/app-server/tutorial/service/service.html -
4. Re: EJB initialization
sbivol Aug 31, 2007 2:29 PM (in response to edwiles)Did the tutorial work for you?
I created a service as described in the tutorial, but it is throwing an exception when I shutdown jboss.
Then I deployed the tutorial applicatoin from the src url specified in the previous post, and it fails again at jboss shutdown. Here are the exceptions on the jboss console:
2007-08-31 14:17:55,870 WARN [ServiceDelegateWrapper] Stopping failed jboss.j2ee:jar=tutorial.jar,name=ServiceThree,ser
vice=EJB3
java.lang.RuntimeException: javax.management.InstanceNotFoundException: jboss.j2ee:jar=tutorial.jar,name=ServiceThree,se
rvice=EJB3,type=ManagementInterface is not registered.
....
stack trace
....
2007-08-31 14:17:56,308 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:jar=tutorial.
jar,name=ServiceThree,service=EJB3,type=ManagementInterface
ServiceTwo - Stopping
2007-08-31 14:17:56,308 WARN [ServiceDelegateWrapper] Stopping failed jboss.j2ee:jar=tutorial.jar,name=ServiceTwo,servi
ce=EJB3
java.lang.RuntimeException: javax.management.InstanceNotFoundException: tutorial:service=serviceTwo is not registered.
...
stack trace
...
followed by same message for ServiceOne.
Is this a known issue?
Thanks
Sergiu