[jboss-jira] [JBoss JIRA] Commented: (JBAS-8895) Can't connect to JMS before server has started up completely

Jack van Ooststroom (JIRA) jira-events at lists.jboss.org
Mon Feb 21 19:17:13 EST 2011


    [ https://issues.jboss.org/browse/JBAS-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583708#comment-12583708 ] 

Jack van Ooststroom commented on JBAS-8895:
-------------------------------------------

I created a jboss-web.xml with the following contents:

<jboss-web>
    <depends>org.hornetq:module=JMS,name=test,type=Topic</depends>
</jboss-web>

After deploying and starting the JBoss AS 6.0.0.Final server, I get the following:

18:04:48,942 ERROR [ProfileServiceBootstrap] Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.web.deployment:war=/jmstest" is missing the following dependencies:
    Dependency "org.hornetq:module=JMS,name=test,type=Topic" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'org.hornetq:module=JMS,name=test,type=Topic' **")

DEPLOYMENTS IN ERROR:
  Deployment "org.hornetq:module=JMS,name=test,type=Topic" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.hornetq:module=JMS,name=test,type=Topic' **

	at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]
	at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]
	at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]
	at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]
	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
	at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
	at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
	at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]


Am I missing something (else) in my jboss-web.xml?

> Can't connect to JMS before server has started up completely
> ------------------------------------------------------------
>
>                 Key: JBAS-8895
>                 URL: https://issues.jboss.org/browse/JBAS-8895
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JMS (HornetQ)
>    Affects Versions: 6.0.0.Final
>         Environment: JBoss 6.0.0.Final with HornetQ configured
>            Reporter: Jack van Ooststroom
>         Attachments: jmstest.war
>
>
> It seems that with JBoss AS 6.0.0.Final I can't connect to JMS before the application server itself has started up completely. I'm using the InitialContext approach as I can't use Message Driven Beans in the project.
> I created a JMS Topic in [jboss-home]/server/default/deploy/hornetq/hornetq-jms.xml as follows:
>     <topic name="MyTopic">
>        <entry name="/topic/test"/>
>     </topic>
> Next I'm trying to connect to JMS from my JMSServlet's init(ServletConfig) method, but that seems to fail when executing the JMS detection on the original thread (that is the thread supplied by the application server) as follows:
>     Unable to validate user: null for check type CREATE_NON_DURABLE_QUEUE for address jms.topic.MyTopic
> I'd prefer not having to specify the user/password, but even if I do it fails in a similar fashion:
>     Unable to validate user: guest for check type CREATE_NON_DURABLE_QUEUE for address jms.topic.MyTopic
> When I do the detection of JMS on a seperate thread it eventually seems to work, as long as the application server started up completely. However, timing is then a bit undeterministic. When running this test on earlier versions of JBoss AS, namely 5 and 4, or other application servers the detection seems to succeed on the first try on the original thread.
> Why does JBoss AS 6.0.0.Final behave differently? Is there some configuration I am missing? Is this a potential bug?
> I'll attach my JMS Test application which tries to connect to JMS using 6 different strategies:
>     * On original thread
>     * On original thread after sleep
>     * On spawned thread with await/signal
>     * On spawned thread with await/signal after sleep
>     * On spawned thread without await/signal
>     * On spawned thread without await/signal after sleep
> The source is included in the jmstest.war file.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list