2 Replies Latest reply on Oct 19, 2010 1:13 PM by calvin21

    JBoss startup sequence

    calvin21

      Hi,

       

      I have two webapps in my JBoss instance. The first one is a web service and the second one has a startup servlet that makes a request to the web service. It looks like until JBoss has completely started, the webapps cant talk to each other.

       

      This is also obvious from the startup log below which shows that the HttpConnector that listens on port 8080 for incoming requests is initialized only after all webapps have been deployed.

       

      18:29:08,283 INFO  [STDOUT] [INFO] Deploying Web service: StockQuoteService - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/services/StockQuoteService/

      18:29:08,348 INFO  [TomcatDeployer] deploy, ctxPath=/client, warUrl=.../deploy/client.war/

      18:29:10,981 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/

      18:29:11,597 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080

      18:29:11,618 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009

      18:29:11,644 INFO  [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 26s:182ms

       

      Whats the right solution to this (without having a seperate instance of JBoss)? Can we modify the JBoss startup sequence so the Coyote Http listener is initialized before the webapps are deployed.

       

      Any help will be much appreciated.

       

      Thanks!

      Kailash.

        • 1. Re: JBoss startup sequence
          jaikiran

          Who is logging this message:

           

          18:29:08,283 INFO  [STDOUT] [INFO] Deploying Web service:  StockQuoteService - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/services/StockQuoteService/

          It doesn't appear to be coming from JBoss AS classes. The deployment path name too is a bit interesting (the "." after the default/). Do you have the entire console log (not server.log)?

          • 2. Re: JBoss startup sequence
            calvin21

            Thanks Jaikiran for your reply. As i understand, JBoss AS stands for JBoss Application server, please correct me if Im in the wrong forum.

             

            Below is the full dump from the console. Thanks!

             

            [root@lnx bin]# ./run.sh
            =========================================================================

             

              JBoss Bootstrap Environment

             

              JBOSS_HOME: /JBOSS/jboss-4.2.3

             

              JAVA: java

             

              JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true

             

              CLASSPATH: /JBOSS/jboss-4.2.3/bin/run.jar

             

            =========================================================================

             

            14:47:14,147 INFO  [Server] Starting JBoss (MX MicroKernel)...
            14:47:14,148 INFO  [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)
            14:47:14,150 INFO  [Server] Home Dir: /JBOSS/jboss-4.2.3
            14:47:14,150 INFO  [Server] Home URL: file:/JBOSS/jboss-4.2.3/
            14:47:14,151 INFO  [Server] Patch URL: null
            14:47:14,151 INFO  [Server] Server Name: default
            14:47:14,151 INFO  [Server] Server Home Dir: /JBOSS/jboss-4.2.3/server/default
            14:47:14,151 INFO  [Server] Server Home URL: file:/JBOSS/jboss-4.2.3/server/default/
            14:47:14,152 INFO  [Server] Server Log Dir: /JBOSS/jboss-4.2.3/server/default/log
            14:47:14,152 INFO  [Server] Server Temp Dir: /JBOSS/jboss-4.2.3/server/default/tmp
            14:47:14,152 INFO  [Server] Root Deployment Filename: jboss-service.xml
            14:47:14,558 INFO  [ServerInfo] Java version: 1.6.0_17,Sun Microsystems Inc.
            14:47:14,558 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 14.3-b01,Sun Microsystems Inc.
            14:47:14,558 INFO  [ServerInfo] OS-System: Linux 2.6.18-194.8.1.el5,i386
            14:47:15,240 INFO  [Server] Core system initialized
            14:47:18,003 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/
            14:47:18,005 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
            14:47:18,553 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
            14:47:18,553 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
            14:47:18,753 INFO  [TransactionManagerService] Starting recovery manager
            14:47:18,825 INFO  [TransactionManagerService] Recovery manager started
            14:47:18,825 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
            14:47:22,328 INFO  [EJB3Deployer] Starting java:comp multiplexer
            14:47:26,443 INFO  [NativeServerConfig] JBoss Web Services - Native
            14:47:26,444 INFO  [NativeServerConfig] jbossws-3.0.1-native-2.0.4.GA (build=200803312044)
            14:47:27,781 INFO  [Embedded] Catalina naming disabled
            14:47:27,913 INFO  [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/jdk/jdk1.6.0_17/jre/lib/i386/server:/usr/jdk/jdk1.6.0_17/jre/lib/i386:/usr/jdk/jdk1.6.0_17/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
            14:47:28,120 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
            14:47:28,121 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
            14:47:28,121 INFO  [Catalina] Initialization processed in 340 ms
            14:47:28,121 INFO  [StandardService] Starting service jboss.web
            14:47:28,131 INFO  [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
            14:47:28,165 INFO  [Catalina] Server startup in 43 ms
            14:47:28,253 INFO  [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
            14:47:28,975 INFO  [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
            14:47:29,268 INFO  [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
            14:47:29,508 INFO  [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
            14:47:31,380 INFO  [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
            14:47:32,046 INFO  [MailService] Mail Service bound to java:/Mail
            14:47:32,189 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
            14:47:32,217 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
            14:47:32,245 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
            14:47:32,270 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
            14:47:32,479 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
            14:47:32,507 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
            14:47:32,538 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
            14:47:32,546 INFO  [QuartzResourceAdapter] start quartz!!!
            14:47:32,617 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main
            14:47:32,637 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
            14:47:32,640 INFO  [RAMJobStore] RAMJobStore initialized.
            14:47:32,640 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
            14:47:32,640 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
            14:47:32,641 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
            14:47:33,904 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
            14:47:34,183 INFO  [A] Bound to JNDI name: queue/A
            14:47:34,185 INFO  [B] Bound to JNDI name: queue/B
            14:47:34,187 INFO  [C] Bound to JNDI name: queue/C
            14:47:34,188 INFO  [D] Bound to JNDI name: queue/D
            14:47:34,189 INFO  [ex] Bound to JNDI name: queue/ex
            14:47:34,207 INFO  [testTopic] Bound to JNDI name: topic/testTopic
            14:47:34,209 INFO  [securedTopic] Bound to JNDI name: topic/securedTopic
            14:47:34,216 INFO  [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
            14:47:34,219 INFO  [testQueue] Bound to JNDI name: queue/testQueue
            14:47:34,266 INFO  [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
            14:47:34,319 INFO  [DLQ] Bound to JNDI name: queue/DLQ
            14:47:35,150 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
            14:47:35,242 INFO  [TomcatDeployer] deploy, ctxPath=/axis2, warUrl=.../deploy/axis2.war/
            14:47:36,236 INFO  [STDOUT] [INFO] Clustering has been disabled
            14:47:37,767 INFO  [STDOUT] [INFO] Deploying module: script-1.5.1 - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/modules/axis2-scripting-1.5.1.mar
            14:47:37,776 INFO  [STDOUT] [INFO] Deploying module: jaxws-1.5.1 - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/modules/axis2-jaxws-mar-1.5.1.mar
            14:47:37,787 INFO  [STDOUT] [INFO] Deploying module: mtompolicy-1.5.1 - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/modules/mtompolicy-1.5.1.mar
            14:47:37,798 INFO  [STDOUT] [INFO] Deploying module: soapmonitor-1.5.1 - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/modules/soapmonitor-1.5.1.mar
            14:47:37,885 INFO  [STDOUT] [INFO] Deploying module: ping-1.5.1 - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/modules/ping-1.5.1.mar
            14:47:37,907 INFO  [STDOUT] [INFO] Deploying module: addressing-1.5.1 - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/modules/addressing-1.5.1.mar
            14:47:38,386 INFO  [STDOUT] [INFO] Deploying module: metadataExchange-1.5.1 - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/modules/mex-1.5.1.mar
            14:47:38,412 INFO  [STDOUT] [INFO] Deploying module: metadataExchange-1.5.1-impl - file:/JBOSS/jboss-4.2.3/server/default/deploy/axis2.war/WEB-INF/lib/mex-1.5.1-impl.jar
            14:47:38,442 INFO  [STDOUT] [WARN] Exception extracting jars into temporary directory : java.io.FileNotFoundException: /JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF (Is a directory) : switching to alternate class loading mechanism
            14:47:39,091 INFO  [STDOUT] [INFO] Deploying Web service: version-1.5.1.aar - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/services/version-1.5.1.aar
            14:47:39,101 INFO  [STDOUT] [INFO] Deploying Web service: StockQuoteService - file:/JBOSS/jboss-4.2.3/server/default/./deploy/axis2.war/WEB-INF/services/StockQuoteService/
            14:47:39,172 INFO  [TomcatDeployer] deploy, ctxPath=/client, warUrl=.../deploy/client.war/
            14:47:39,896 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
            14:47:40,320 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
            14:47:40,350 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
            14:47:40,379 INFO  [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 26s:225ms