-
1. Re: Changing ConnectionFactory to another name?
schaefera Aug 5, 2002 6:14 AM (in response to winghoe)Hi
In 2.4.x go to jboss.jcml, in 3.0 go to jbossmq-service.xml and look for the NamingAlias MBean.
You can add now a new NamingAlias and map ConnectionFactory to MyConnectionFactory (like we mapped the QueueConnectionFactory to ConnectionFactory).
Have fun - Andy -
2. Re: Changing ConnectionFactory to another name?
winghoe Aug 6, 2002 12:59 AM (in response to winghoe)Andy,
Are you talking about the example below:
ConnectionFactory
QueueConnectionFactory
I extracted this from jboss.jcml(2.4.4). Can't see it in JBoss 3 though.
I use the same code in jbossmq-service.xml?
Wing Hoe -
3. Re: Changing ConnectionFactory to another name?
winghoe Aug 6, 2002 1:01 AM (in response to winghoe)Andy,
Are you talking about the example below:
ConnectionFactory
QueueConnectionFactory
I extracted this from jboss.jcml(2.4.4). Can't see it in JBoss 3 though.
I use the same code in jbossmq-service.xml?
Wing Hoe -
4. Re: Changing ConnectionFactory to another name?
schaefera Aug 6, 2002 4:49 AM (in response to winghoe)Hi
Yes, use the same XML snippet but rename "DefaultDomain" to "jboss.mq".
Have fun - Andy -
5. Re: Changing ConnectionFactory to another name?
winghoe Aug 6, 2002 5:10 AM (in response to winghoe)I was reading the QuickDraft. In the Naming chapter, it seems like it's possible to do the following:
ejb-jar.xml
---------------------------------
<resource-ref>
<res-ref-name>SGConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jboss.xml
---------------------------------
<resource-ref>
<res-ref-name>SGConnectionFactory</res-ref-name>
<jndi-name>ConnectionFactory</jndi-name>
</resource-ref>
From QuickDraft, it seems like I'm able to create such association, so I supposedly can match the SGConnectionFactory in my MDB to JBoss's default ConnectionFactory.
However, it doesn't seem to work that way when I tried to deploy it over JBoss 3. Is it possible actually? Or do I still have to use the AliasNaming stuff?
Wing Hoe -
6. Re: Changing ConnectionFactory to another name?
schaefera Aug 6, 2002 6:43 AM (in response to winghoe)Hi
Resource References are local JNDI name mapping which are specific to an EJB. So you could avoid naming conflicts when the deployer has to rename the JNDI name for whatever reason. So the EJB can use the same local JNDI name even when the actual JNDI name changes later on.
But with a Resource Ref the JNDI name starts with a certain prefix: "java:/comp/env".
Have fun - Andy -
7. Re: Changing ConnectionFactory to another name?
winghoe Aug 6, 2002 11:32 PM (in response to winghoe)You mean, the <res-ref-name> tag must have the prefix of java:/comp/env followed by the JNDI name that I use?
Anyway, the NamingAlias stuff is working, for both the ConnectionFactory and the Queue.
Thanks for the tip, Andy.
Wing Hoe