Strange behaviour with messaging

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange behaviour with messaging

Vimal Kansal
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 [
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\",
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\"
]"]}
15:01:24,996 INFO  [org.jboss.as.server.deployment] (MSC service thread
1-11) Stopped deployment Hello.war in 14ms
15:01:25,000 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads
- 1) {"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/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 [
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\",
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\"
]"]}}}


(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.

I am seeing this behaviour in both AS7 final standalone-preview and
AS7.10 alpha snapshot standalone-preview.xml.

Thx

Vimal


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Jaikiran Pai
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
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Vimal Kansal
Thanks a lot Jaikiran; you are a star!

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
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Heiko Braun
In reply to this post by Jaikiran Pai


it's two different things: CLI>;jndi-view() does list the actual jndi tree.
Whereas console>JMS shows the entry names of the messaging subsystem config.

On Jul 19, 2011, at 7:17 AM, Jaikiran Pai wrote:

>>
>>
>> (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.


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Vimal Kansal
Aren't JMS resources registered with JNDI tree? When I deploy an with
EJBs, all EJBs are clearly seen as registered in JNDI view, so how come
the messaging resource which indeed is registered with JNDI tree is not
getting displayed? When I execute /subsystem=naming:jndi-view, as the
operation name indicates, shouldn't it show me a view of what exactly is
registered inside JNDI at a given point in time?

Vimal

On 19/07/2011 5:21 PM, Heiko Braun wrote:

>
> it's two different things: CLI>;jndi-view() does list the actual jndi tree.
> Whereas console>JMS shows the entry names of the messaging subsystem config.
>
> On Jul 19, 2011, at 7:17 AM, Jaikiran Pai wrote:
>
>>>
>>> (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.
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Heiko Braun


you have been looking at the JMS configuration within the console,
but the JNDI tree through the CLI.

Although they should match as you correctly pointed out,
it's two different things. This doesn't make sense:

"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."


They are not using the same operation and they shouldn't.


Ike

On Jul 19, 2011, at 10:44 AM, Vimal Kansal wrote:

> Aren't JMS resources registered with JNDI tree? When I deploy an with
> EJBs, all EJBs are clearly seen as registered in JNDI view, so how come
> the messaging resource which indeed is registered with JNDI tree is not
> getting displayed? When I execute /subsystem=naming:jndi-view, as the
> operation name indicates, shouldn't it show me a view of what exactly is
> registered inside JNDI at a given point in time?
>
> Vimal
>
> On 19/07/2011 5:21 PM, Heiko Braun wrote:
>>
>> it's two different things: CLI>;jndi-view() does list the actual jndi tree.
>> Whereas console>JMS shows the entry names of the messaging subsystem config.
>>
>> On Jul 19, 2011, at 7:17 AM, Jaikiran Pai wrote:
>>
>>>>
>>>> (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.
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Vimal Kansal
So, is this something that needs to be fixed?

On 19/07/2011 6:50 PM, Heiko Braun wrote:

>
> you have been looking at the JMS configuration within the console,
> but the JNDI tree through the CLI.
>
> Although they should match as you correctly pointed out,
> it's two different things. This doesn't make sense:
>
> "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."
>
> They are not using the same operation and they shouldn't.
>
>
> Ike
>
> On Jul 19, 2011, at 10:44 AM, Vimal Kansal wrote:
>
>> Aren't JMS resources registered with JNDI tree? When I deploy an with
>> EJBs, all EJBs are clearly seen as registered in JNDI view, so how come
>> the messaging resource which indeed is registered with JNDI tree is not
>> getting displayed? When I execute /subsystem=naming:jndi-view, as the
>> operation name indicates, shouldn't it show me a view of what exactly is
>> registered inside JNDI at a given point in time?
>>
>> Vimal
>>
>> On 19/07/2011 5:21 PM, Heiko Braun wrote:
>>> it's two different things: CLI>;jndi-view() does list the actual jndi tree.
>>> Whereas console>JMS shows the entry names of the messaging subsystem config.
>>>
>>> On Jul 19, 2011, at 7:17 AM, Jaikiran Pai wrote:
>>>
>>>>> (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.
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Heiko Braun

If they don't show in the JNDI tree, yes.
But that's not related to  the CLI or the console.


On Jul 19, 2011, at 10:52 AM, Vimal Kansal wrote:

> So, is this something that needs to be fixed?

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Vimal Kansal
Yup they are not showing up in the JNDI tree; very simple to verify :

Just execute the operation :

/subsystem=naming:jndi-view. In my deployment, this what I get :

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

[standalone@localhost:9999 /] /subsystem=naming:jndi-view
{
     "outcome" => "success",
     "result" => {
         "java: contexts" => {
             "java:jboss" => {
                 "jaas" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "children" => {"other" => {
                         "class-name" =>
"org.jboss.as.security.plugins.SecurityDomainContext",
                         "value" =>
"org.jboss.security.authentication.JBossCachedAuthenticationManager@114f313"
                     }}
                 },
                 "TransactionManager" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" =>
"com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@c5575"
                 },
                 "datasources" => {
                     "class-name" => "javax.naming.Context",
                     "children" => {"ExampleDS" => {
                         "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                         "value" =>
"org.jboss.jca.adapters.jdbc.WrapperDataSource@f2f973"
                     }}
                 },
                 "orb" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "org.jacorb.orb.ORB@ee5d13"
                 },
                 "irpoa" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "org.jacorb.poa.POA@39880a"
                 },
                 "poa" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "org.jacorb.poa.POA@d767dc"
                 },
                 "TransactionSynchronizationRegistry" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" =>
"com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple@30380"
                 },
                 "corbanaming" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" =>
"IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E3000000000000100000000000000E4000102000000000A3132372E302E302E3100
0DC8000000144A426F73732F4E616D696E67504F412F726F6F74000000030000000000000008000000004A414300000000010000002000000000000100010000000105010001000101090000000205010001000101000000002100000074000000000000
00010000000000000024000000220000007E00000000000000010000000F3136392E3235342E3138372E313700000DC9004000000000000000080606678102010101000000170401000806066781020101010000000764656661756C7400000000000000
00000000000000000000"
                 }
             },
             "java:global" => {"TODService" => {
                 "class-name" => "javax.naming.Context",
                 "children" => {
                     "TimeOfDay!ejb.TimeOfDay" => {
                         "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                         "value" => "Proxy for view class: ejb.TimeOfDay
of EJB: TimeOfDay"
                     },
                     "TimeOfDay" => {
                         "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                         "value" => "Proxy for view class: ejb.TimeOfDay
of EJB: TimeOfDay"
                     }
                 }
             }}
         },
         "applications" => {"TODService.war" => {
             "java:app" => {
                 "AppName" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "TODService"
                 },
                 "TODService" => {
                     "class-name" => "javax.naming.Context",
                     "children" => {
                         "TimeOfDay!ejb.TimeOfDay" => {
                             "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                             "value" => "Proxy for view class:
ejb.TimeOfDay of EJB: TimeOfDay"
                         },
                         "TimeOfDay" => {
                             "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                             "value" => "Proxy for view class:
ejb.TimeOfDay of EJB: TimeOfDay"
                         }
                     }
                 }
             },
             "modules" => {"TODService" => {"java:module" => {
                 "TimeOfDay" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "Proxy for view class: ejb.TimeOfDay of
EJB: TimeOfDay"
                 },
                 "Validator" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" =>
"org.hibernate.validator.engine.ValidatorImpl@35ff29"
                 },
                 "TimerService" => {"class-name" =>
"org.jboss.as.naming.context.ModularReference"},
                 "TimeOfDay!ejb.TimeOfDay" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "Proxy for view class: ejb.TimeOfDay of
EJB: TimeOfDay"
                 },
                 "ValidatorFactory" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" =>
"org.jboss.as.ee.beanvalidation.LazyValidatorFactory@d837c1"
                 },
                 "UserTransaction" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "Transaction: unknown"
                 },
                 "ModuleName" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" => "TODService"
                 },
                 "TransactionSynchronizationRegistry" => {
                     "class-name" =>
"org.jboss.as.naming.context.ModularReference",
                     "value" =>
"com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple@30380"
                 },
                 "EJBContext" => {"class-name" =>
"org.jboss.as.naming.context.ModularReference"}
             }}}
         }}

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

Thx.

Vimal

On 19/07/2011 6:53 PM, Heiko Braun wrote:
> If they don't show in the JNDI tree, yes.
> But that's not related to  the CLI or the console.
>
>
> On Jul 19, 2011, at 10:52 AM, Vimal Kansal wrote:
>
>> So, is this something that needs to be fixed?

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour with messaging

Jaikiran Pai
In reply to this post by Jaikiran Pai
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
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev