KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > jms > QueueConnectionFactory

javax.jms
Interface QueueConnectionFactory

All Superinterfaces:
ConnectionFactory
All Known Subinterfaces:
XAQueueConnectionFactory
See Also:
Top Examples, Source Code

public QueueConnection createQueueConnection()
                                      throws JMSException
See Also:
JMSSecurityException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[195]Look up JMS QueueConnectionFactory
By Anonymous on 2003/03/26 09:14:42  Rate
QueueConnectionFactory queueConnectionFactory; 
 try  {  
   Context ctx = getInitialContext (  ) ; 
   queueConnectionFactory =  ( QueueConnectionFactory ) ctx.lookup ( queueConnectionFactoryBindingName ) ; 
   queueConnection = queueConnectionFactory.createQueueConnection (  ) ; 
   queueSession = queueConnection.createQueueSession ( false, Session.AUTO_ACKNOWLEDGE ) ; 
   Queue queue =  ( Queue ) ctx.lookup ( queueBindingName ) ; 
   queueSender = queueSession.createSender ( queue ) ; 
   queueConnection.start (  ) ; 
   ctx.close (  ) ; 
  }  
 catch ( Exception ex )   {  
   errorHandler.error ( "Error in activateOptions", ex, ErrorCode.GENERIC_FAILURE ) ; 
  }  
 


public QueueConnection createQueueConnection(String userName,
                                             String password)
                                      throws JMSException
See Also:
JMSSecurityException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags