Thread: [Ejtools-cvs] CVS: applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-04-30 21:13:23
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms In directory usw-pr-cvs1:/tmp/cvs-serv6009/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms Modified Files: ConnectionFactoryProxy.java ConnectionService.java ConnectionServiceProvider.java DeliveryModeEditor.java MessageProxy.java QueueProxy.java TextMessageProxy.java TopicProxy.java Log Message: Add getTitle support for I18N Pretty print source code Index: ConnectionFactoryProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/ConnectionFactoryProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConnectionFactoryProxy.java 22 Apr 2002 17:38:42 -0000 1.1 --- ConnectionFactoryProxy.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import java.beans.beancontext.BeanContextServiceRevokedEvent; import java.beans.beancontext.BeanContextServices; --- 7,10 ---- *************** *** 18,22 **** import javax.rmi.PortableRemoteObject; - // Other Imports import net.sourceforge.ejtools.jndibrowser.model.JNDIEntry; import org.apache.log4j.Category; --- 17,20 ---- Index: ConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/ConnectionService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConnectionService.java 22 Apr 2002 17:38:42 -0000 1.1 --- ConnectionService.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import javax.jms.QueueConnectionFactory; import javax.jms.TopicConnectionFactory; --- 7,10 ---- Index: ConnectionServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/ConnectionServiceProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConnectionServiceProvider.java 22 Apr 2002 17:38:42 -0000 1.1 --- ConnectionServiceProvider.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import java.beans.beancontext.BeanContextServiceProvider; import java.beans.beancontext.BeanContextServices; --- 7,10 ---- *************** *** 19,23 **** import javax.swing.JPanel; - // Other Imports import org.apache.log4j.Category; --- 18,21 ---- Index: DeliveryModeEditor.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/DeliveryModeEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DeliveryModeEditor.java 22 Apr 2002 17:38:59 -0000 1.1 --- DeliveryModeEditor.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,14 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import javax.jms.DeliveryMode; - // Other Imports import com.dreambean.awt.editors.TagsEditor; --- 7,12 ---- Index: MessageProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/MessageProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MessageProxy.java 22 Apr 2002 17:40:48 -0000 1.1 --- MessageProxy.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import java.awt.Component; import java.util.Date; --- 7,10 ---- *************** *** 15,19 **** import javax.jms.TextMessage; - // Other Imports import net.sourceforge.ejtools.jndibrowser.model.JNDIEntry; import org.apache.log4j.Category; --- 14,17 ---- Index: QueueProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/QueueProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QueueProxy.java 22 Apr 2002 17:41:03 -0000 1.1 --- QueueProxy.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import java.beans.beancontext.BeanContextServices; import java.util.Enumeration; --- 7,10 ---- *************** *** 26,30 **** import javax.rmi.PortableRemoteObject; - // Other Imports import net.sourceforge.ejtools.jndibrowser.model.JNDIEntry; import org.apache.log4j.Category; --- 25,28 ---- *************** *** 86,138 **** public void createMessage() { ! Context jndiContext = null; ! QueueConnectionFactory queueConnectionFactory = null; ! QueueConnection queueConnection = null; ! QueueSession queueSession = null; ! QueueSender queueSender = null; ! Message message = null; ! ! // TO MODIFY ! try ! { ! jndiContext = new InitialContext(); ! queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("ConnectionFactory"); ! } ! catch (NamingException e) { ! System.out.println("JNDI lookup failed: " + e.toString()); ! } ! // TO MODIFY ! try ! { ! queueConnection = queueConnectionFactory.createQueueConnection(); ! queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); ! queueSender = queueSession.createSender(queue); message = queueSession.createMessage(); queueSender.send(message); ! queueSession.close(); ! } ! catch (JMSException e) ! { ! System.out.println("Exception occurred: " + e.toString()); ! } ! finally ! { ! if (queueConnection != null) { ! try ! { ! queueConnection.close(); ! } ! catch (JMSException e) { } } } - - this.browse(); } --- 84,123 ---- public void createMessage() { ! // Get a connection on the default factory ! QueueConnection queueConnection = getQueueConnection(); ! if (queueConnection != null) { ! try ! { ! Message message = null; ! QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); ! QueueSender queueSender = queueSession.createSender(queue); message = queueSession.createMessage(); queueSender.send(message); ! queueSession.close(); ! } ! catch (JMSException e) { ! System.out.println("Exception occurred: " + e.toString()); ! } ! finally ! { ! if (queueConnection != null) { + try + { + queueConnection.close(); + } + catch (JMSException e) + { + } } } + // Browse the content + this.browse(); } } Index: TextMessageProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/TextMessageProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TextMessageProxy.java 22 Apr 2002 17:50:35 -0000 1.1 --- TextMessageProxy.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import java.awt.Component; import javax.jms.JMSException; --- 7,10 ---- *************** *** 13,17 **** import javax.jms.TextMessage; - // Other Imports import org.apache.log4j.Category; --- 12,15 ---- Index: TopicProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/net/sourceforge/ejtools/jndibrowser/model/jms/TopicProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TopicProxy.java 22 Apr 2002 17:50:51 -0000 1.1 --- TopicProxy.java 30 Apr 2002 21:13:20 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.ejtools.jndibrowser.model.jms; - // Standard Imports import javax.jms.JMSException; import javax.jms.Message; --- 7,10 ---- *************** *** 22,26 **** import javax.rmi.PortableRemoteObject; - // Other Imports import net.sourceforge.ejtools.jndibrowser.model.JNDIEntry; import org.apache.log4j.Category; --- 21,24 ---- *************** *** 49,53 **** { this.topic = (Topic) PortableRemoteObject.narrow(o, Topic.class); - // this.topic = (Topic) o; } --- 47,50 ---- |