[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
hi: I am an Chinese boy! Can you share your experiences with me? thanks a lot! My MSN:[EMAIL PROTECTED] View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822628#3822628 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822628 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
to Adrian: I run my program while JBoss is running. but it still does not work. Follow is JNDIContext: java.util.Hashtable JNDIParm = new java.util.Hashtable(); JNDIParm.put(Context.PROVIDER_URL, localhost); JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory); jndiContext = new InitialContext(JNDIParm); when I use it to look up EntityBean,it runs well. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822476#3822476 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822476 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
package simple; import javax.jms.*; import javax.naming.*; public class SimpleQueueReceiver { public static void main(String[] args) { String queueName = A; Context jndiContext = null; QueueConnectionFactory queueConnectionFactory = null; QueueConnection queueConnection = null; QueueSessionqueueSession = null; Queue queue = null; QueueReceiver queueReceiver = null; TextMessage message = null; System.out.println(Queue name is + queueName); try { // jndiContext = new InitialContext(); java.util.Hashtable JNDIParm = new java.util.Hashtable(); JNDIParm.put(Context.PROVIDER_URL, localhost); JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory); jndiContext = new InitialContext(JNDIParm); queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup(ConnectionFactory ); queue = (Queue) jndiContext.lookup(queueName); queueConnection = queueConnectionFactory.createQueueConnection(); queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); queueReceiver = queueSession.createReceiver(queue); queueConnection.start(); while (true) { Message m = queueReceiver.receive(1); if (m != null) { if (m instanceof TextMessage) { message = (TextMessage) m; System.out.println(Reading message: + message.getText()); } else { break; } } } } catch (Exception e) { e.printStackTrace(); } finally { if (queueConnection != null) { try { queueConnection.close(); } catch (JMSException e) {} } } } } View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822477#3822477 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822477 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
Up is my JMS reciever. I known there is a default Queue named A.But How can I get ConnectionFactory?Is there a JNDI name I can use and what is it? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822478#3822478 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822478 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
Queue name is A javax.naming.NameNotFoundException: ConnectionFactory not bound at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507) at javax.naming.InitialContext.lookup(InitialContext.java:350) at simple.SimpleQueueReceiver.main(SimpleQueueReceiver.java:69) This is the error message when it runs. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822480#3822480 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822480 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
Thank you,everyone. The problem has resovled. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822487#3822487 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822487 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
My code is below: try { java.util.Hashtable JNDIParm = new java.util.Hashtable(); JNDIParm.put(Context.PROVIDER_URL, localhost); JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory); jndiContext = new InitialContext(JNDIParm); } catch (NamingException e) { System.out.println(Could not create JNDI API + context: + e.toString()); System.exit(1); } try { queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup(JBossMQProvider); queue = (Queue) jndiContext.lookup(queueName); } catch (NamingException e) { System.out.println(JNDI API lookup failed: + e.toString()); System.exit(1); } View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822237#3822237 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822237 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
JBossMQProvider when my program run, it throws an exception, JNDI API lookup failed: javax.naming.NameNotFoundException: JBossMQProvider not bound who can Help? thank you View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822241#3822241 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822241 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: How Can I get a ConnectionFactory using JMS with JBoss?
lookup UIL2ConnectionFactory Regards, Adrian View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3822261#3822261 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3822261 --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user