Hi All,
I have a problem using the JBoss Scheduler deployer:
I have the following set up in the scheduled-service.xml file which is
deployed in JBoss, the service is supposed to start after the
local/AssociationListener EJB is deployed, but it seems that the service
is starting before the EJB is deployed.
<mbean code="org.jboss.varia.scheduler.Scheduler"
name=":service=CapeClear">
<attribute name="StartAtStartup">true</attribute>
<attribute
name="SchedulableClass">net.aurium.adapters.travel.adapters.weather.Weat
herAdapterJBoss</attribute>
<attribute
name="SchedulableArguments">false,http://www.aurium.net/enroute/ontologi
es/weather.html</attribute>
<attribute
name="SchedulableArgumentTypes">java.lang.Boolean,java.lang.String</attr
ibute>
<attribute name="InitialStartDate">NOW</attribute>
<attribute name="SchedulePeriod">60000</attribute>
<attribute name="InitialRepetitions">-1</attribute>
<depends-list>
<depends-list-element>jboss.j2ee:jndiName=local/AssociationListener,serv
ice=EJB</depends-list-element>
</depends-list>
</mbean>
Basically, I have a scheduled class that runs after my EJBs have been
deployed, unfortunately, JBoss recognises the EJBs to be deployed at
this stage:
17:20:44,125 INFO [EjbModule.info] Deploying AssociationListener
17:20:45,265 INFO [JMSContainerInvoker.info] Creating
17:20:45,281 INFO [JMSContainerInvoker.info] Created
17:20:45,281 INFO [Scheduler.info] Creating
17:20:45,281 INFO [Scheduler.info] Created
As you can see, I'm waiting on a particular EJB to be deployed, but at
this stage, the tables haven't be created in the DB, and the JNDI tree
doesn't have references to these EJBs.
The exception I get is as follows:
17:21:27,843 INFO [Scheduler.info] Started
17:21:27,843 INFO [Scheduler.info] Starting
17:21:28,609 INFO [STDOUT.write] Setup: Setting Up JNDI usign
jndi.properties
17:21:28,609 INFO [ContextAdapterManagerBusinessDelegate.updateJNDI]
jndi is :ContextAdapterManager
17:21:28,609 INFO [ContextAdapterManagerBusinessDelegate.init] getting
the remote home: ContextAdapterManager
17:21:28,609 INFO [WebTierServiceLocator.getRemoteHome] printing out
the jndiHomeName: ContextAdapterManager
17:21:28,609 ERROR [STDERR.write] javax.naming.NameNotFoundException:
ContextAdapterManager not bound
17:21:28,609 ERROR [STDERR.write] at
org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
17:21:28,609 ERROR [STDERR.write] at
org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
17:21:28,625 ERROR [STDERR.write] at
org.jnp.server.NamingServer.getObject(NamingServer.java:509)
17:21:28,640 ERROR [STDERR.write] at
org.jnp.server.NamingServer.lookup(NamingServer.java:282)
17:21:28,640 ERROR [STDERR.write] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464)
17:21:28,656 ERROR [STDERR.write] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
17:21:28,656 ERROR [STDERR.write] at
javax.naming.InitialContext.lookup(InitialContext.java:347)
17:21:28,671 ERROR [STDERR.write] at
net.aurium.context.util.WebTierServiceLocator.getRemoteHome(WebTierServi
ceLocator.java:126)
17:21:28,687 ERROR [STDERR.write] at
net.aurium.context.facades.interfaces.ContextAdapterManagerBusinessDeleg
ate.init(ContextAdapterManagerBusinessDele
e.java:84)
17:21:28,703 ERROR [STDERR.write] at
net.aurium.context.facades.interfaces.ContextAdapterManagerBusinessDeleg
ate.<init>(ContextAdapterManagerBusinessDe
ate.java:57)
17:21:28,718 ERROR [STDERR.write] at
net.aurium.adapters.travel.adapters.weather.WeatherAdapterJBoss.perform(
WeatherAdapterJBoss.java:286)
17:21:28,734 ERROR [STDERR.write] at
org.jboss.varia.scheduler.Scheduler$Listener.handleNotification(Schedule
r.java:1046)
17:21:28,734 ERROR [STDERR.write] at
org.jboss.mx.server.NotificationListenerProxy.handleNotification(Notific
ationListenerProxy.java:71)
17:21:28,750 ERROR [STDERR.write] at
javax.management.NotificationBroadcasterSupport.sendNotification(Notific
ationBroadcasterSupport.java:84)
17:21:28,750 ERROR [STDERR.write] at
javax.management.timer.Timer.sendNotifications(Timer.java:441)
17:21:28,781 ERROR [STDERR.write] at
javax.management.timer.Timer.access$000(Timer.java:31)
17:21:28,796 ERROR [STDERR.write] at
javax.management.timer.Timer$RegisteredNotification.doRun(Timer.java:612
)
17:21:28,796 ERROR [STDERR.write] at
org.jboss.mx.util.SchedulableRunnable.run(SchedulableRunnable.java:164)
17:21:28,812 ERROR [STDERR.write] at
org.jboss.mx.util.ThreadPool$Worker.run(ThreadPool.java:225)
Whats happening as far as I can see is that JBoss "thinks" the EJBs are
deployed, but that they aren't yet.
Does anyone have a fix for this?
Or (perhaps more likely) what am I doing wrong?
I've tried
<attribute name="StartAtStartup">false</attribute>
But it doesn't start at all then,
Thanks in advance for any help,
Oisin
Oisin Kim
Aurium
Tel: +353 1 6611132
Fax: +353 1 6615200
e-mail: [EMAIL PROTECTED]
web site: http://www.aurium.net
-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user