[Messaging, JMS & JBossMQ] - Re: No resource manager found for jms/TCF
by Nishank
Hi all,
After lot of hair pulling I've finally found out the workaround of the problem.
I am not sure whether its a Jboss bug or our application bug.
I will give the steps what i have done to resolve this No resource manger found issue.
This is part of ejb-jar.xml which was giving the problem
<resource-ref id="res_ref_1">
<res-ref-name>jms/TCF</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
The corresponding Jboss.xml looks like this:
<resource-ref>
<res-ref-name>jms/TCF</res-ref-name>
<resource-name>jms/TCF</resource-name>
</resource-ref>
<resource-managers>
<resource-manager res-class="javax.jms.TopicConnectionFactory">
<res-name>jms/TCF</res-name>
<res-jndi-name>TopicConnectionFactory</res-jndi-name>
</resource-manager>
</resource-managers>
Generally <resource-name> tag in Jboss.xml provides an indirection to the resource manager. The resource-name and res-name tags should be equal.. In my case both are jms/TCF. This is as per to the documentation of Jboss. But, I dont know this is not working. Rather if I make res-ref-name and res-name tag as equal(jms/TCF) and remove the resource-name tag from Jboss.xml then it starts working fine.
This is a workaround and still I am not sure whether it will work for others or not but for me it is working fine.
If somebody gets a much better solution then please do intimate me.
Any suggestions will be highly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142724#4142724
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142724
18 years
[JNDI/Naming/Network] - Re: NameNotBoundException
by bambooh
Thisi is the code that call for lookup ejb
| public void changeSceltaSede(ValueChangeEvent event){
| log.info("Sede selezionata #0 :: #1 ", utenteRivalse.getSedeSelezionata().getCodice(),utenteRivalse.getSedeSelezionata().getDenominazione());
| //devo caricare le info della sede
| Context context;
| try {
| context = getContext();
| Accesso accessoBean = (Accesso)context.lookup("java:comp/env/RivalseEar/AccessoBean/local");
| accessoBean.confermaSceltaSede();
| } catch (NamingException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
|
| private static Context getContext()throws NamingException{
|
| Context ctx = new InitialContext(System.getProperties());
| ctx.addToEnvironment("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| ctx.addToEnvironment("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
| ctx.addToEnvironment("java.naming.provider.url", "localhost:1099");
| return ctx;
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142721#4142721
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142721
18 years
[JNDI/Naming/Network] - Re: NameNotBoundException
by jaikiran
anonymous wrote : +- RivalseEar (class: org.jnp.interfaces.NamingContext)
| | +- EjbSynchronizations (class: org.jnp.interfaces.NamingContext)
| | | +- localStatefulProxyFactory (class: org.jboss.ejb3.stateful.StatefulLocalProxyFactory)
| | | +- local (class: java.lang.Object)
| | +- TimerServiceDispatcher (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy89 implements interface org.jboss.seam.async.LocalTimerServiceDispa
| tcher,interface org.jboss.ejb3.JBossProxy)
| | +- AccessoBean (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy82 implements interface it.inail.rivalse.session.security.Accesso,interface org.jboss.ejb3.JBossProxy)
|
The jndi tree does show that the bean is bound with that jndi-name. Can you post the code of it.inail.rivalse.jsf.converters.ConfermaSceltaSedeEvent.changeSceltaSede method where you are doing the lookup? Are you passing anything to the InitialContext constructor? Or do you have a jndi.properties in your application?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142713#4142713
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142713
18 years