2 Replies Latest reply on Aug 26, 2014 3:14 AM by maneendr

    Migration to JBoss 5, Scheduler not working

    osnetwork

      Hello everybody,

      I'm trying to port my application from JBoss AS 4.x to JBoss 5.1.

      The application seems to be deployed fine. In fact inside my EAR I have various jar and a WEB application
      The fact that the WEB application is working fine means that also the other jar/EJBs are deployed and working correctly.

      The problem is that in my application I have defined a service inside the META-INF of the EAR like that:

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <mbean code="org.jboss.varia.scheduler.Scheduler"
       name="com.os:service=Scheduler">
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.os.schedule.LobbyScheduler</attribute>
       <attribute name="SchedulableArguments">lobbyTopic,1</attribute>
       <attribute name="SchedulableArgumentTypes">java.lang.String,long</attribute>
       <attribute name="InitialStartDate">NOW</attribute>
       <attribute name="SchedulePeriod">5000</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <!--
       <depends>jboss.j2ee:service=EARDeployment,url='gamgamEAR.ear'</depends>
       <depends>jboss.j2ee:url='gamgamEAR.ear',service=EARDeployer</depends>
       <depends>jboss.j2ee:jndiName=gamgamEAR/LobbyManager/local,service=EJB3</depends>
       -->
       <depends>jboss.j2ee:url='gamgamEAR.ear',service=EJB3</depends>
       </mbean>
      </server>

      basically it should call every 5 seconds a class LobbyScheduler that implements the org.jboss.varia.scheduler.Schedulable interface.

      the problem is that I always get the same error, that comes from the tag.
      DEPLOYMENTS MISSING DEPENDENCIES:
       Deployment "com.os:service=Scheduler" is missing the following dependencies:
       Dependency "jboss.j2ee:service=EJB3,url='gamgamEAR.ear'" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.j2ee:service=EJB3,url='gamgamEAR.ear'' **")
      
      DEPLOYMENTS IN ERROR:
       Deployment "jboss.j2ee:service=EJB3,url='gamgamEAR.ear'" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.j2ee:service=EJB3,url='gamgamEAR.ear'' **

      In fact it seems that it doesn't find the EAR deployed or the address is wrong
      In my old configuration (JBoss 4.x) I had:
      <depends>jboss.j2ee:service=EARDeployment,url='gamgamEAR.ear'</depends>

      and it was working fine. Probably in the AS 5, the name has been changed from EARDeployment to EARDeployer but still I'm not able to find the right sintax.

      I was trying to point at the EJB used by Scheduler class that in my case is LobbyManager, but even in that case it's not working.

      I was checking the JMX-Console for the name of the Bean LobbyManager. and putting that string into tag I have as result no more errors... but nothing happens... so that means that the scheduler is not called.
      ear=gamgamEAR.ear,jar=gamgamEJB.jar,name=LobbyManager,service=EJB3
      
      <depends>jboss.j2ee:ear=gamgamEAR.ear,jar=gamgamEJB.jar,name=LobbyManager,service=EJB3</depends>


      Do you have any advice?

      PS=is that Scheduler way J2EE 5 compliant? If not how can I replace that scheduler with something portable.

      Thanks in advance

        • 1. Re: Migration to JBoss 5, Scheduler not working
          osnetwork

           

          "osnetwork" wrote:
          I was checking the JMX-Console for the name of the Bean LobbyManager. and putting that string into <depends> tag I have as result no more errors... but nothing happens... so that means that the scheduler is not called.
          ear=gamgamEAR.ear,jar=gamgamEJB.jar,name=LobbyManager,service=EJB3
          
          <depends>jboss.j2ee:ear=gamgamEAR.ear,jar=gamgamEJB.jar,name=LobbyManager,service=EJB3</depends>


          Do you have any advice?

          PS=is that Scheduler way J2EE 5 compliant? If not how can I replace that scheduler with something portable.

          Thanks in advance


          Sorry, I have solved... actually putting the address found on the JMX-Console has fixed the problem. I had another problem not related to JBoss so for this reason I was not able to test the functionality properly.


          • 2. Re: Migration to JBoss 5, Scheduler not working
            maneendr

            Hi,

             

            I am migrating the app from jboss 4.2.1 to jboss 6.1.0 and I have the same question you posted. Could you please elaborate how you fixed the issue?

             

            How to put the below dependency in jboss 6.1.0?


            <depends>jboss.j2ee:service=EARDeployment,url='gamgamEAR.ear'</depends>


            Thanks...