[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
Is this topic a JBoss JNDI bug ? http://www.nabble.com/JNDI-with-ActiveMQ-embedded-in-JBoss-AS-td25151104.html View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252037#4252037 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252037 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
...this is what i tryed :-/ the lookup call throw no exceptions but the queueConnectionFactory object is null (i got the output NULL for queueC...). STRANGE :-( if i try to create a new queueConnection like this: queueConnection = queueConnectionFactory.createQueueConnection(); ... of course - i get a null pointer exception :-/ ... i use JBoss 5.1 GA View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252034#4252034 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252034 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
"moonbird79" wrote : | +- activemq (class: org.jnp.interfaces.NamingContext) | | +- topic (class: org.jnp.interfaces.NamingContext) | | | +- inbound (class: org.apache.activemq.command.ActiveMQTopic) | | +- QueueConnectionFactory (class: org.apache.activemq.ra.ActiveMQConnectionFactory) | +- stationInfoQueue (class: org.apache.activemq.command.ActiveMQQueue) | +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) The following call should work ConnectionFactory factory = (ConnectionFactory) ctx.lookup("activemq/QueueConnectionFactory"); What error do you get when this is called? Does this configuration work in JBoss4.x series? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251949#4251949 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251949 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
for alle people who dont know why my connectionfactory is available in the (not common for jca ressource adapter) GLOBAL jndi namespace, you have to use: false ... in your datasource file. ;-) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251772#4251772 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251772 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
and - if i uncomment: //queueConnectionFactory = new ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_BROKER_URL); it works - but - without jndi support :-( and ActiveMQConnectionFactory is not a JMS API call ! :-( View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251762#4251762 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251762 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
... and as far as this site describes: http://activemq.apache.org/jndi-support.html "ActiveMQ will work with any JNDI provider capable of storing Java objects." View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251760#4251760 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251760 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
This is my datasource for the activemq provider: | | | http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd";> | | | | | activemq/QueueConnectionFactory | | false | | activemq-ra.rar | javax.jms.QueueConnectionFactory | vm://localhost | | 1 | 200 | 3 | 3 | | | | activemq/TopicConnectionFactory | | | activemq-ra.rar | javax.jms.TopicConnectionFactory | vm://localhost | | 1 | 200 | 3 | 3 | | | | stationInfoQueue | jboss.jca:service=RARDeployment,name='activemq-ra.rar' | javax.jms.Queue | PhysicalName=queue.outbound | | | | activemq/topic/inbound | jboss.jca:service=RARDeployment,name='activemq-ra.rar' | javax.jms.Topic | PhysicalName=topic.inbound | | | | and this is the result of my GLOBAL JNDI Namespace (JBoss Console): +- activemq (class: org.jnp.interfaces.NamingContext) | +- topic (class: org.jnp.interfaces.NamingContext) | | +- inbound (class: org.apache.activemq.command.ActiveMQTopic) | +- QueueConnectionFactory (class: org.apache.activemq.ra.ActiveMQConnectionFactory) +- stationInfoQueue (class: org.apache.activemq.command.ActiveMQQueue) +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251759#4251759 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251759 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JNDI and Naming] - Re: JNDI lookup from JBoss embedded MQ Provider
This is my code fragment, after the jndi lookup conectionfactory and the destination are both null :-( : | // initialize jndi connection (jboss specific configuration) | Properties props = new Properties(); | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); | props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099"); | //props.setProperty("j2ee.clientName", "TestClient"); | | // this is from http://activemq.apache.org/jndi-support.html | //props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.apache.activemq.jndi.ActiveMQInitialContextFactory"); | //props.setProperty(Context.PROVIDER_URL,"tcp://localhost:61616"); | | | // declare all variables for jndi and message transfer needed | Context ctx = null; | ActiveMQConnectionFactory queueConnectionFactory = null; | QueueConnection queueConnection = null; | QueueSession queueSession = null; | Queue stationInfoQueue = null; | MessageProducer msgProducer = null; | TextMessage textMessage = null; | | // create new initial context from jndi | try | { | ctx = new InitialContext(props); | } | catch (NamingException e) | { | System.out.println("Could not create JNDI API context: " + e); | System.exit(1); | } | | // Look up connection factory and destination | try | { | ConnectionFactory factory = (ConnectionFactory) ctx.lookup("activemq/QueueConnectionFactory"); | //queueConnectionFactory = new ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_BROKER_URL); | | stationInfoQueue = (Queue) ctx.lookup("stationInfoQueue"); | | if (factory == null) | { | System.out.println("NULL for queueConnectionFactory"); | } | | if (stationInfoQueue == null) | { | System.out.println("NULL for stationInfoQueue"); | } | } | catch (NamingException e) | { | System.out.println("JNDI API lookup failed:" + e); | System.exit(1); | } | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251659#4251659 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251659 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user