I have written a small client, that is supposed to send TextMessages to 
queue/testQueue, but I get a strange error in the server.log.

Im running a fresh install of 4.0.1sp1 on windows.

Here is my client:

import javax.jms.*;
  | import javax.naming.*;
  | 
  |  
  | public class test {
  |  
  |     public static void main(String [] args) throws Exception {
  |             // set properties for at kunne lave lookup til JBoss JNDI
  |             System.setProperty("java.naming.factory.initial", 
"org.jnp.interfaces.NamingContextFactory");
  |             System.setProperty("java.naming.factory.url.pkgs", 
"org.jnp.interfaces");
  |             System.setProperty("java.naming.provider.url", 
"localhost:1099");
  |       
  |             InitialContext jndiContext = new InitialContext();
  |             QueueConnectionFactory factory = (QueueConnectionFactory)
  |         jndiContext.lookup("ConnectionFactory");
  |         
  |         Queue queue = (Queue)
  |         jndiContext.lookup("queue/testQueue");
  |      
  |         QueueConnection connect = factory.createQueueConnection();
  |      
  |         QueueSession session = connect.createQueueSession(true,0);
  |      
  |         QueueSender sender = session.createSender(queue);
  |      
  |         TextMessage textMsg = session.createTextMessage();
  |         for(int i=0; i<100;i++){
  |         textMsg.setText("This is a message...hello nr. "+i);
  |         sender.send(textMsg);
  |         }
  |         connect.close();
  | 
  |     }
  | }

And the error:

2005-04-04 14:17:14,062 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin 
ReadTask.run
  | 2005-04-04 14:17:14,062 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created 
ObjectInputStream
  | 2005-04-04 14:17:14,062 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin 
WriteTask.run
  | 2005-04-04 14:17:14,062 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created 
ObjectOutputStream
  | 2005-04-04 14:17:14,109 DEBUG 
[org.jboss.mq.il.uil2.ServerSocketManagerHandler] Setting up the UILClientIL 
Connection
  | 2005-04-04 14:17:14,109 DEBUG 
[org.jboss.mq.il.uil2.ServerSocketManagerHandler] The UILClientIL Connection is 
set up
  | 2005-04-04 14:17:14,218 DEBUG 
[org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
  | java.net.SocketException: socket closed
  |     at java.net.SocketInputStream.socketRead0(Native Method)
  |     at java.net.SocketInputStream.read(SocketInputStream.java:129)
  |     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
  |     at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
  |     at 
org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:67)
  |     at 
java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
  |     at 
java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2380)
  |     at 
java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2447)
  |     at 
java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2519)
  |     at 
java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2668)
  |     at java.io.ObjectInputStream.readByte(ObjectInputStream.java:864)
  |     at 
org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:285)
  |     at java.lang.Thread.run(Thread.java:595)
  | 2005-04-04 14:17:14,234 DEBUG [org.jboss.mq.il.uil2.SocketManager] End 
ReadTask.run
  | 2005-04-04 14:17:14,234 DEBUG [org.jboss.mq.il.uil2.SocketManager] End 
WriteTask.run

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872543#3872543

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872543


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to