Hi,

I'm working with JBoss 4.0.4.GA. I have an ear that contains a jar and a sar. 
The jar contains an ejb (SLSB) and the classes it needs, while the sar only 
content is a jboss-service.xml that defines a Scheduler, so that when the 
scheduler is deployed JBoss already knows about the class to call (which is in 
the same jar as the ejb).
So far so good. I deploy everything successfully, but when the scheduler calls 
my class, and my class tries to lookup the ejb home in the jndi context, I get 
a "javax.naming.NameNotFoundException: env not bound".
What looks weird to me is that as soon as I make an external call to that same 
ejb, which happens to be also exposed as a web service, the jndi context 
becomes valid, and the next round from the scheduler (and all the ones 
thereafter) succeed. Note that this is not time dependent: I can get the 
exception for hours, the lookup only succeeds after the first access to the ejb.
Is this is normal behavior? Does anyone know a way around this?

The jboss-service.xml inside the sar:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE server>
  | 
  | <server>
  |     <mbean code="javax.management.timer.Timer" name=":service=IGPTimer" />
  | 
  |     <mbean code="org.jboss.varia.scheduler.Scheduler"
  |             name=":service=TokenCleanupScheduler">
  |             <attribute name="StartAtStartup">true</attribute>
  |             <attribute name="SchedulableClass">
  |                     it.igp.ejb.jobs.TokenCleanupJob
  |             </attribute>
  |             <attribute name="SchedulableArguments"></attribute>
  |             <attribute name="SchedulableArgumentTypes"></attribute>
  |             <attribute name="InitialStartDate">NOW</attribute>
  |             <!-- Run every 10 minutes -->
  |             <attribute name="SchedulePeriod">600000</attribute>
  |             <attribute name="InitialRepetitions">-1</attribute>
  |     </mbean>
  | </server>
  | 

Thanks in advance,
Alessandro

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951302#3951302

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951302


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to