-
1. Re: Perform computation at start up
sugramoin Dec 4, 2003 8:06 AM (in response to sugramoin)Can any one help me out , here...
When jboss server starts i want it to do same clean up task in database through its deployed entity beans.
I wanted to use a MBean to do this which works on startup of a server.
Tell me how to do this.
TIA
Moin -
2. Re: Perform computation at start up
raja05 Dec 4, 2003 10:29 AM (in response to sugramoin)Have a depends clause in the jboss-service.xml for ur mbean. something like
jboss.j2ee:jndiName=local/TestMDB,service=EJB
The depends should have the objectname for ur EJB. Look up the JMX-Console to get the objectname for ur ejb. it will be in the jboss.j2ee domain.
-Raj -
3. Re: Perform computation at start up
sugramoin Dec 4, 2003 12:49 PM (in response to sugramoin)Thanx Raj
i will try this. -
4. Re: Perform computation at start up
sugramoin Dec 9, 2003 1:08 PM (in response to sugramoin)i did that change in mbean tag. but this din't slove my problem.
It says env not bound..14:02:11,734 INFO [TimeLineScheduler] starting Scheduler MBean 14:02:11,734 INFO [TimeLineScheduler] Removing all aged time line schedules 14:02:11,734 ERROR [STDERR] javax.naming.NameNotFoundException: env not bound 14:02:11,734 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) 14:02:11,750 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) 14:02:11,750 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:509) 14:02:11,750 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:253) 14:02:11,750 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492) 14:02:11,750 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606) 14:02:11,750 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
I guess the mbean is looking up the EJB before they are deployed.
What do i need to do to stop MBeans for some more time, like till all the EJB are deployed there DB is configured and they are ready to use.
looking for help
Moin -
5. Re: Perform computation at start up
raja05 Dec 9, 2003 2:22 PM (in response to sugramoin)Just lookup the bean using the absolute jndi name and not using java:comp/env
-
6. Re: Perform computation at start up
sugramoin Dec 9, 2003 2:45 PM (in response to sugramoin)Hey Raj
I tried that, but thats also not working ...
throwing this error saying name not found15:41:22,015 INFO [STDOUT] Started the K5Scanner to implement the schedules for Kommander 15:41:22,015 INFO [TimeLineScheduler] starting Scheduler MBean 15:41:22,015 INFO [TimeLineScheduler] Removing all aged time line schedules 15:41:22,015 ERROR [STDERR] javax.naming.NameNotFoundException: TimeLine_Home not bound 15:41:22,015 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) 15:41:22,015 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) 15:41:22,015 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:509) 15:41:22,015 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:282) 15:41:22,015 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492) 15:41:22,015 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) 15:41:22,015 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:347)
Is there any thing else i need to do ...
Guess i am missing somthing.
Moin