on 07-19-2006 9:16 AM
Hello,
I would like to search for a JMS Queue Connection Factory that already been configured by SAP on the WAS which is up and running. It's name is: DAserviceQueueFactory.
The problem is that if I search it I receive "Path to object does not exist at java:comp, the whole lookup name is..."
I tried searching with:
1. queueConnectionFactory = (QueueConnectionFactory)
ctx.lookup("java:comp/env/DAserviceQueueFactory");
2. queueConnectionFactory = (QueueConnectionFactory)
ctx.lookup("java:comp/env/jms/DAserviceQueueFactory");
And I receive the same error on both.
Any idea why?
did you try
<b>jmsfactory/default/DAserviceQueueFactory</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I thought about it too, since this is the path and the JNDI registry but it makes no sence do search like this since it is not the standard way. I think this is just a mapping between the java:comp/jms/ and the actual location of SAP JNDI registry. Anyway, I gave it a try now and as I suspected, for this search I receive: "Object not found in lookup of DAserviceQueueFactory"
Hi Roy,
You are right, the recommended and the standard way is to lookup it from your java:comp/env, not from the global root. Any other ways - (using the global context root) may stop working in subsequent server versions, since it is not according to the J2EE specification.
If everything is declared in the deployment descriptors , your resource should be visible should be visible under
"java:comp/env/jms/DAserviceQueueFactory";
How you can search what you have in the naming :
open the telnet administration (can be done from MMC) and type the following commands :
jump 0
add naming
lsn > c:\my_naming.txt
Then open the file manually and check what has been bound and where. I hope you can find your DAserviceQueueFactory and get an idea where it is.
Btw, one possible problem is that you have obtained the context from another bean in another ear and you have cached it (ServiceLocator design patter). Then afterwards the lookup to java:comp/env - would be against the first application and its resources, where the factory won't be declared.
HTH
Peter
Hi Peter,
If all I need is to declare the resource-rf at the session bean and search the jms and the JNDI context than I assume I did everything. If I missed something I will be happy to know what.
The cached context is not the case here but it was a very good thinking in my opinion...
What I am trying to do is simply add an MDB to the Quick Car application example using an already configured Factory.
When I open the file I see it at the correct location (I think). Here is what I see:
QuickOrderProcessorBean [Context]
java:comp [Context]
HandleDelegate
ORB
env [Context]
QuickCarRental [Context]
QuickBookingBean
jms [Context]
DAserviceQueueFactory
InformerBean [Context]
java:comp [Context]
By the way, now I see I get a different message:
Exception during lookup operation of object with name ejbContexts/sap.com/QuickCarRentalApplication/sap.com/QuickCarRentalApplication/QuickOrderProcessorBean/java:comp/env/jms/DAserviceQueueFactory, cannot resolve object reference.
Hi Roy,
Are you using it in web project?
Did you add "jms/DAserviceQueueFactory" as "Resource entries" of type "javax.jms.QueueConnectionFactory" on "Resource" tab of web.xml?
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.