[jboss-as7-dev] Strange behaviour with messaging

Jaikiran Pai jpai at redhat.com
Tue Jul 19 06:15:48 EDT 2011


It's a bug with ConnectionFactory binding. The JMS bindings in 7.0 and 
current upstream are buggy. As a workaround, edit the standalone-preview 
to change this:

<entries>
<entry name="java:/ConnectionFactory"/>
</entries>

to this:

<entries>
<entry name="ConnectionFactory"/>
</entries>

(removed java:/ since it by default gets bound to java:/ namespace).

You'll then be able to inject the ConnectionFactory as follows:

@Resource(mappedName="java:/ConnectionFactory")

All these JMS bindings need to be fixed as part of 
https://issues.jboss.org/browse/AS7-1210. I'll see if I spare sometime 
tonight and come up with a patch.

-Jaikiran

On Tuesday 19 July 2011 11:14 AM, Vimal Kansal wrote:
> Hi JaiKiran,
>
> With change to mapped name for queue, I think it is getting resolved 
> but ConnectionFactory object is still not getting resolved :
>
> 15:39:26,477 INFO  [org.jboss.as.server.controller] 
> (DeploymentScanner-threads - 1) Deployment of "Hello.war" was rolled 
> back with failure message {"Services with missing/unavailable 
> dependencies" => 
> ["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2 
> missing [ jboss.naming.context.java.ConnectionFactory 
> ]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing 
> [ 
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\" 
> ]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START 
> missing [ 
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\" 
> ]"]}
> 15:39:26,490 INFO  [org.jboss.as.server.deployment] (MSC service 
> thread 1-2) Stopped deployment Hello.war in 14ms
> 15:39:26,493 ERROR [org.jboss.as.deployment] 
> (DeploymentScanner-threads - 2) {"Composite operation failed and was 
> rolled back. Steps that failed:" => {"Operation step-2" => {"Services 
> with missing/unavailable dependencies" => 
> ["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2 
> missing [ jboss.naming.context.java.ConnectionFactory 
> ]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing 
> [ 
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\" 
> ]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START 
> missing [ 
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\" 
> ]"]}}}
>
>
> On 19/07/2011 3:17 PM, Jaikiran Pai wrote:
>> Comments inline.
>>
>> On Tuesday 19 July 2011 10:41 AM, Vimal Kansal wrote:
>>> Hi,
>>>
>>> I have reported this earlier also, restating here. I am having some
>>> problem with using messaging and observing some strange behaviour with
>>> how messaging objects \ :
>>>
>>> (1) Can't deploy a simple .war file.
>>> =============================
>>> I have a simple servlet, in which I have injected messaging resources
>>> like this :
>>>
>>>
>>>        @Resource(mappedName = "java:/ConnectionFactory")
>>>        private QueueConnectionFactory queueConnectionFactory;
>>>        @Resource(mappedName = "queue/test")
>>>        private Queue queue;
>>>
>>> Also, I have added the following entr to WEB-INF/META-INF/MANIFEST.MF
>>>
>>> Dependencies: org.hornetq.ra
>>>
>>> When I deploy the .war, I get the following error :
>>>
>>> 15:01:24,984 INFO  [org.jboss.as.server.controller]
>>> (DeploymentScanner-threads - 2) Deployment of "Hello.war" was rolled
>>> back with failure message {"Services with missing/unavailable
>>> dependencies" =>
>>> ["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2 
>>>
>>> missing [ jboss.naming.context.java.ConnectionFactory
>>> ]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing [
>>> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\", 
>>>
>>> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\" 
>>>
>>> ]","jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.3 
>>>
>>> missing [ jboss.naming.context.java.module.Hello.Hello.env/queue/test
>>> ]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START 
>>>
>>> missing [
>>> ...
>>>
>> See this for the JNDI errors http://community.jboss.org/thread/168979.
>> Use mappedName="java:/queue/test" for now. Also see the referenced JIRA
>> in that thread https://issues.jboss.org/browse/AS7-1210.
>>
>>
>>
>>> (2) View of messaging resources from admin console is different from
>>> command line invocation of :jndi-view command
>>> ========================================================================================================== 
>>>
>>>
>>> In admin console web app, I can see testQueue, testTopic and
>>> ConnectionFactory but when I run /subsystem=naming:jndi-view command
>>> from jboss-admin , these resources are not visible in JNDI tree.
>> Ideally, both the admin console and the CLI should end up using the same
>> operation to list the jndi-view. Probably that's not happening
>> currently. Will take a look later.
>>
>> -Jaikiran
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>



More information about the jboss-as7-dev mailing list