2 Replies Latest reply on Oct 9, 2007 3:47 AM by watchcat

    Deployment order, EJB and SAR

    watchcat

      Has faced such problem.

      There is application App.ear. Inside of which two modules - App.ejb and App.sar.
      App.sar in META-INF \jboss-app.xml is accordingly registered

      <jboss-app>
       <module>
       <service>App.sar</service>
       </module>
      </jboss-app>
      


      However JBoss deploy the application with error.
      2007-10-08 18:56:37,000 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/D:/STORAGE/jboss-4.0.5.GA/server/default/deploy/App.ear
      2007-10-08 18:56:37,312 DEBUG [ru.lab34.dsys.srv.DSystemServer] Creating lab34.server:service=Server
      2007-10-08 18:56:37,312 DEBUG [ru.lab34.dsys.srv.DSystemServer] Created lab34.server:service=Server
      2007-10-08 18:56:37,437 INFO [org.jboss.ejb.EjbModule] Deploying SchemeEJB
      2007-10-08 18:56:37,656 DEBUG [ru.lab34.dsys.srv.DSystemServer] Starting lab34.server:service=Server
      2007-10-08 18:56:37,687 TRACE [ru.lab34.dsys.srv.TaskManager] TaskManager()
      2007-10-08 18:56:37,687 DEBUG [ru.lab34.dsys.srv.DSystemServer] Starting failed lab34.server:service=Server
      javax.naming.NameNotFoundException: SchemeHome not bound
      ...
      2007-10-08 18:56:37,687 WARN [org.jboss.system.ServiceController] Problem starting service lab34.server:service=Server
      javax.naming.NameNotFoundException: SchemeHome not bound
      ...
      2007-10-08 18:56:37,703 INFO [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] Bound EJB LocalHome 'SchemeEJB' to jndi 'local/LocalSchemeHome'
      2007-10-08 18:56:37,718 INFO [org.jboss.proxy.ejb.ProxyFactory] Bound EJB Home 'SchemeEJB' to jndi 'remote/SchemeHome'
      


      I.e. JBoss creates mbean,
      then deploy ejb,
      then start mbean
      and only then bind a bean-name in jndi.

      And it is necessary to me that mbean has started already after names will be appointed.
      Otherwise mbean will not start.

      PS if manually deploy ejb-module and then sar-module in a deploy directory all works well. But up to Jboss restart :(