"anders.hedstrom" wrote : I don't really understand your question...
  | 
  | But you start JBoss using the run.bat file located in the bin directory. If 
you don't supply any arguments, JBoss will start the default configuration, if 
you supply run.bat -c all, JBoss will start the all configuration....and so 
on...

actuallly, i am trying to run


  | import java.util.Hashtable;
  | 
  | import javax.jms.JMSException;
  | import javax.jms.Queue;
  | import javax.jms.QueueConnection;
  | import javax.jms.QueueConnectionFactory;
  | import javax.jms.QueueSender;
  | import javax.jms.QueueSession;
  | import javax.jms.Session;
  | import javax.jms.TextMessage;
  | import javax.naming.Context;
  | import javax.naming.InitialContext;
  | import javax.naming.NamingException;
  | 
  | public class QueueSend
  | {
  |     public static void main(String[] args)
  |     {
  |             try
  |             {
  |                     // create a JNDI context
  |                     Hashtable properties = new Hashtable();
  |                     
properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.exolab.jms.jndi.InitialContextFactory");
  |                     
properties.put(Context.PROVIDER_URL,"rmi://localhost:1099/");
  |                     Context context = new InitialContext(properties);
  |                     
  |                     // retrieve queue connection factory
  |                     QueueConnectionFactory queueConnectionFactory = 
  |                                     
(QueueConnectionFactory)context.lookup("JmsQueueConnectionFactory");
  |                     // create a queue connection
  |                     QueueConnection queueConnection = 
queueConnectionFactory.createQueueConnection();
  |                     
  |                     // create a queue session
  |                     // set transactions to false and set auto 
acknowledgement of receipt of messages
  |                     QueueSession queueSession = 
queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
  |                     
  |                     // retrieve queue
  |                     Queue queue = (Queue)context.lookup("queue1");
  |                     
  |                     // create a queue sender and associate to the retrieved 
queue
  |                     QueueSender queueSender = 
queueSession.createSender(queue);
  |                     
  |                     // send a message to the queue 
  |                     TextMessage message = queueSession.createTextMessage();
  |                     message.setText("Hello there.");
  |                     queueSender.send(message);
  |                     
  |                     System.out.println("Sample application writing message 
to queue.");
  |                     
  |                     // clean up
  |                     queueSender.close();
  |                     queueSession.close();
  |                     queueConnection.close();
  |                                             
  |             }
  |             catch (NamingException e)
  |             {
  |                     e.printStackTrace();
  |             }
  |             catch (JMSException e)
  |             {
  |                     e.printStackTrace();
  |             }
  |             
  |                     
  |     }
  | }
  | 
  | 
  | 



i am running from command line.  do i have deploy this code ?

can not i run from the command line ?


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

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


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to