User: chirino
Date: 01/08/16 20:04:04
Modified: src/main/org/jboss/mq/il/jvm JVMClientIL.java
JVMClientILService.java JVMServerIL.java
JVMServerILFactory.java JVMServerILService.java
JVMServerILServiceMBean.java
Log:
Used the ejbdoclet pretty task to auto-indent the source files to
the 3 space standard.
Revision Changes Path
1.2 +42 -41 jbossmq/src/main/org/jboss/mq/il/jvm/JVMClientIL.java
Index: JVMClientIL.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/jvm/JVMClientIL.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JVMClientIL.java 2001/08/11 20:59:13 1.1
+++ JVMClientIL.java 2001/08/17 03:04:03 1.2
@@ -8,52 +8,53 @@
import javax.jms.Destination;
import javax.jms.JMSException;
-
-
-
-
-
+import org.jboss.mq.Connection;
+import org.jboss.mq.ReceiveRequest;
import org.jboss.mq.SpyDestination;
-import org.jboss.mq.ReceiveRequest;
import org.jboss.mq.il.ClientIL;
-import org.jboss.mq.Connection;
/**
- * The RMI implementation of the ConnectionReceiver object
- *
- * @author Norbert Lataille ([EMAIL PROTECTED])
- * @author Hiram Chirino ([EMAIL PROTECTED])
- *
- * @version $Revision: 1.1 $
+ * The RMI implementation of the ConnectionReceiver object
+ *
+ * @author Norbert Lataille ([EMAIL PROTECTED])
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
public class JVMClientIL implements ClientIL {
- // A reference to the connection
- Connection connection;
- // Are we running
- boolean stopped= true;
-
- JVMClientIL(Connection c) {
- connection= c;
- }
-
- public void close() throws Exception {
- if (stopped)
- throw new IllegalStateException("The client IL is stopped");
- connection.asynchClose();
- }
-
- //One TemporaryDestination has been deleted
- public void deleteTemporaryDestination(SpyDestination dest) throws
JMSException {
- if (stopped)
- throw new IllegalStateException("The client IL is stopped");
- connection.asynchDeleteTemporaryDestination(dest);
- }
-
- public void receive(ReceiveRequest messages[]) throws Exception {
- if (stopped)
- throw new IllegalStateException("The client IL is stopped");
- connection.asynchDeliver(messages);
- }
-}
\ No newline at end of file
+ // A reference to the connection
+ Connection connection;
+ // Are we running
+ boolean stopped = true;
+
+ JVMClientIL( Connection c ) {
+ connection = c;
+ }
+
+ public void close()
+ throws Exception {
+ if ( stopped ) {
+ throw new IllegalStateException( "The client IL is stopped" );
+ }
+ connection.asynchClose();
+ }
+
+ //One TemporaryDestination has been deleted
+ public void deleteTemporaryDestination( SpyDestination dest )
+ throws JMSException {
+ if ( stopped ) {
+ throw new IllegalStateException( "The client IL is stopped" );
+ }
+ connection.asynchDeleteTemporaryDestination( dest );
+ }
+
+ public void receive( ReceiveRequest messages[] )
+ throws Exception {
+ if ( stopped ) {
+ throw new IllegalStateException( "The client IL is stopped" );
+ }
+ connection.asynchDeliver( messages );
+ }
+}
1.2 +52 -48 jbossmq/src/main/org/jboss/mq/il/jvm/JVMClientILService.java
Index: JVMClientILService.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/jvm/JVMClientILService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JVMClientILService.java 2001/08/11 20:59:13 1.1
+++ JVMClientILService.java 2001/08/17 03:04:03 1.2
@@ -8,61 +8,65 @@
import javax.jms.Destination;
import javax.jms.JMSException;
-
-
-
-
-
-
+import org.jboss.mq.Connection;
+import org.jboss.mq.ReceiveRequest;
import org.jboss.mq.SpyDestination;
-import org.jboss.mq.ReceiveRequest;
import org.jboss.mq.il.ClientIL;
-import org.jboss.mq.Connection;
import org.jboss.mq.il.ClientILService;
/**
- * The RMI implementation of the ConnectionReceiver object
- *
- * @author Norbert Lataille ([EMAIL PROTECTED])
- * @author Hiram Chirino ([EMAIL PROTECTED])
- *
- * @version $Revision: 1.1 $
+ * The RMI implementation of the ConnectionReceiver object
+ *
+ * @author Norbert Lataille ([EMAIL PROTECTED])
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
public class JVMClientILService implements org.jboss.mq.il.ClientILService {
-
- //the client IL
- JVMClientIL clientIL;
-
-
-
+ //the client IL
+ JVMClientIL clientIL;
- /**
- * start method comment.
- */
- public void start() throws java.lang.Exception {
- clientIL.stopped= false;
- }
-
- /**
- *
- */
- public void stop() throws java.lang.Exception {
- clientIL.stopped= false;
- }
-
- /**
- * getClientIL method comment.
- */
- public org.jboss.mq.il.ClientIL getClientIL() throws java.lang.Exception {
- return clientIL;
- }
-
- /**
- * init method comment.
- */
- public void init(org.jboss.mq.Connection connection, java.util.Properties
props) throws java.lang.Exception {
- clientIL= new JVMClientIL(connection);
- }
-}
\ No newline at end of file
+ /**
+ * getClientIL method comment.
+ *
+ * @return The ClientIL value
+ * @exception java.lang.Exception Description of Exception
+ */
+ public org.jboss.mq.il.ClientIL getClientIL()
+ throws java.lang.Exception {
+ return clientIL;
+ }
+
+
+ /**
+ * start method comment.
+ *
+ * @exception java.lang.Exception Description of Exception
+ */
+ public void start()
+ throws java.lang.Exception {
+ clientIL.stopped = false;
+ }
+
+ /**
+ * @exception java.lang.Exception Description of Exception
+ */
+ public void stop()
+ throws java.lang.Exception {
+ clientIL.stopped = false;
+ }
+
+ /**
+ * init method comment.
+ *
+ * @param connection Description of Parameter
+ * @param props Description of Parameter
+ * @exception java.lang.Exception Description of Exception
+ */
+ public void init( org.jboss.mq.Connection connection, java.util.Properties props
)
+ throws java.lang.Exception {
+ clientIL = new JVMClientIL( connection );
+ }
+}
1.2 +125 -117 jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerIL.java
Index: JVMServerIL.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerIL.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JVMServerIL.java 2001/08/11 20:59:13 1.1
+++ JVMServerIL.java 2001/08/17 03:04:03 1.2
@@ -5,133 +5,141 @@
* See terms of license at gnu.org.
*/
package org.jboss.mq.il.jvm;
+import javax.jms.Destination;
import javax.jms.JMSException;
-import javax.jms.Destination;
-import javax.jms.Topic;
import javax.jms.Queue;
-import javax.jms.TemporaryTopic;
import javax.jms.TemporaryQueue;
-
-
-
-
-
-
-
-
-
-
-import org.jboss.mq.il.ServerIL;
-import org.jboss.mq.SpyDestination;
-import org.jboss.mq.ConnectionToken;
+import javax.jms.TemporaryTopic;
+import javax.jms.Topic;
import org.jboss.mq.AcknowledgementRequest;
-import org.jboss.mq.server.JMSServer;
+import org.jboss.mq.ConnectionToken;
+import org.jboss.mq.DurableSubcriptionID;
+import org.jboss.mq.SpyDestination;
import org.jboss.mq.SpyMessage;
import org.jboss.mq.TransactionRequest;
-import org.jboss.mq.DurableSubcriptionID;
+
+import org.jboss.mq.il.ServerIL;
+import org.jboss.mq.server.JMSServer;
/**
- * The JVM implementation of the ServerIL object
- *
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @author Norbert Lataille ([EMAIL PROTECTED])
+ * The JVM implementation of the ServerIL object
*
- * @version $Revision: 1.1 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @author Norbert Lataille ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
public class JVMServerIL implements org.jboss.mq.il.ServerIL {
- //The server implementation
- private JMSServer server;
-
- public JVMServerIL(JMSServer s) {
- server= s;
- }
-
- /**
- * No need to clone because there are no instance variables tha can get
- * clobbered. All Multiple connections can share the same JVMServerIL object
- */
- public ServerIL cloneServerIL() {
- return this;
- }
-
- public void setConnectionToken(ConnectionToken newConnectionToken) {
- // We cannot try to cache the token since this IL is stateless
- }
-
- public String getID() throws JMSException {
- return server.getID();
- }
-
- public void addMessage(ConnectionToken dc, SpyMessage val) throws JMSException
{
- server.addMessage(dc, val.myClone());
- }
-
- public Topic createTopic(ConnectionToken dc, String dest) throws JMSException {
- return server.createTopic(dc, dest);
- }
-
- public Queue createQueue(ConnectionToken dc, String dest) throws JMSException {
- return server.createQueue(dc, dest);
- }
-
- public void deleteTemporaryDestination(ConnectionToken dc, SpyDestination
dest) throws JMSException {
- server.deleteTemporaryDestination(dc, dest);
- }
-
- public void checkID(String ID) throws JMSException {
- server.checkID(ID);
- }
-
- public void connectionClosing(ConnectionToken dc) throws JMSException {
- server.connectionClosing(dc);
- }
-
- public TemporaryQueue getTemporaryQueue(ConnectionToken dc) throws
JMSException {
- return server.getTemporaryQueue(dc);
- }
-
- public TemporaryTopic getTemporaryTopic(ConnectionToken dc) throws
JMSException {
- return server.getTemporaryTopic(dc);
- }
-
- public void acknowledge(ConnectionToken dc, AcknowledgementRequest item)
throws Exception {
- server.acknowledge(dc, item);
- }
-
- public SpyMessage[] browse(ConnectionToken dc, Destination dest, String
selector) throws Exception {
- return server.browse(dc, dest, selector);
- }
-
- public SpyMessage receive(ConnectionToken dc, int subscriberId, long wait)
throws Exception {
- return server.receive(dc, subscriberId, wait);
- }
-
- public void setEnabled(ConnectionToken dc, boolean enabled) throws Exception {
- server.setEnabled(dc, enabled);
- }
-
- public void unsubscribe(ConnectionToken dc, int subscriptionId) throws
Exception {
- server.unsubscribe(dc, subscriptionId);
- }
-
- public void destroySubscription(DurableSubcriptionID id) throws Exception {
- server.destroySubscription(id);
- }
-
- public String checkUser(String userName, String password) throws JMSException {
- return server.checkUser(userName, password);
- }
-
-
-
-
-
- public void subscribe(ConnectionToken dc, org.jboss.mq.Subscription s) throws
Exception {
- server.subscribe(dc, s.myClone());
- }
+ //The server implementation
+ private JMSServer server;
- public void transact(org.jboss.mq.ConnectionToken dc, TransactionRequest t)
throws JMSException {
- server.transact(dc, t);
- }
-}
\ No newline at end of file
+ public JVMServerIL( JMSServer s ) {
+ server = s;
+ }
+
+ public void setConnectionToken( ConnectionToken newConnectionToken ) {
+ // We cannot try to cache the token since this IL is stateless
+ }
+
+ public void setEnabled( ConnectionToken dc, boolean enabled )
+ throws Exception {
+ server.setEnabled( dc, enabled );
+ }
+
+ public String getID()
+ throws JMSException {
+ return server.getID();
+ }
+
+ public TemporaryQueue getTemporaryQueue( ConnectionToken dc )
+ throws JMSException {
+ return server.getTemporaryQueue( dc );
+ }
+
+ public TemporaryTopic getTemporaryTopic( ConnectionToken dc )
+ throws JMSException {
+ return server.getTemporaryTopic( dc );
+ }
+
+ /**
+ * No need to clone because there are no instance variables tha can get
+ * clobbered. All Multiple connections can share the same JVMServerIL object
+ *
+ * @return Description of the Returned Value
+ */
+ public ServerIL cloneServerIL() {
+ return this;
+ }
+
+ public void addMessage( ConnectionToken dc, SpyMessage val )
+ throws JMSException {
+ server.addMessage( dc, val.myClone() );
+ }
+
+ public Topic createTopic( ConnectionToken dc, String dest )
+ throws JMSException {
+ return server.createTopic( dc, dest );
+ }
+
+ public Queue createQueue( ConnectionToken dc, String dest )
+ throws JMSException {
+ return server.createQueue( dc, dest );
+ }
+
+ public void deleteTemporaryDestination( ConnectionToken dc, SpyDestination dest )
+ throws JMSException {
+ server.deleteTemporaryDestination( dc, dest );
+ }
+
+ public void checkID( String ID )
+ throws JMSException {
+ server.checkID( ID );
+ }
+
+ public void connectionClosing( ConnectionToken dc )
+ throws JMSException {
+ server.connectionClosing( dc );
+ }
+
+ public void acknowledge( ConnectionToken dc, AcknowledgementRequest item )
+ throws Exception {
+ server.acknowledge( dc, item );
+ }
+
+ public SpyMessage[] browse( ConnectionToken dc, Destination dest, String
selector )
+ throws Exception {
+ return server.browse( dc, dest, selector );
+ }
+
+ public SpyMessage receive( ConnectionToken dc, int subscriberId, long wait )
+ throws Exception {
+ return server.receive( dc, subscriberId, wait );
+ }
+
+ public void unsubscribe( ConnectionToken dc, int subscriptionId )
+ throws Exception {
+ server.unsubscribe( dc, subscriptionId );
+ }
+
+ public void destroySubscription( DurableSubcriptionID id )
+ throws Exception {
+ server.destroySubscription( id );
+ }
+
+ public String checkUser( String userName, String password )
+ throws JMSException {
+ return server.checkUser( userName, password );
+ }
+
+
+ public void subscribe( ConnectionToken dc, org.jboss.mq.Subscription s )
+ throws Exception {
+ server.subscribe( dc, s.myClone() );
+ }
+
+ public void transact( org.jboss.mq.ConnectionToken dc, TransactionRequest t )
+ throws JMSException {
+ server.transact( dc, t );
+ }
+}
1.2 +20 -18 jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerILFactory.java
Index: JVMServerILFactory.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerILFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JVMServerILFactory.java 2001/08/11 20:59:13 1.1
+++ JVMServerILFactory.java 2001/08/17 03:04:03 1.2
@@ -7,33 +7,35 @@
package org.jboss.mq.il.jvm;
import java.util.Properties;
-
-
-
-
+import org.jboss.mq.il.ServerIL;
import org.jboss.mq.il.ServerILFactory;
-import org.jboss.mq.il.ServerIL;
import org.jboss.mq.server.JMSServer;
/**
- * Implements the ServerILFactory interface to create a new JVMServerIL
+ * Implements the ServerILFactory interface to create a new JVMServerIL
*
- * @author David Maplesden
- * @version $Revision: 1.1 $
+ * @author David Maplesden
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
public class JVMServerILFactory implements ServerILFactory {
+ /**
+ * Used to construct the GenericConnectionFactory (bindJNDIReferences()
+ * builds it)
+ *
+ * @return The ServerIL value
+ * @exception Exception Description of Exception
+ * @returns ServerIL the instance of this IL
+ */
+ public ServerIL getServerIL()
+ throws Exception {
+ return new JVMServerIL( JMSServer.getInstance() );
+ }
- public void init(Properties init){
- }
- /**
- * Used to construct the GenericConnectionFactory (bindJNDIReferences() builds
it)
- * @returns ServerIL the instance of this IL
- */
- public ServerIL getServerIL() throws Exception{
- return new JVMServerIL(JMSServer.getInstance());
- }
+ public void init( Properties init ) {
+ }
-}
\ No newline at end of file
+}
1.2 +84 -78 jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerILService.java
Index: JVMServerILService.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerILService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JVMServerILService.java 2001/08/11 20:59:13 1.1
+++ JVMServerILService.java 2001/08/17 03:04:03 1.2
@@ -7,92 +7,98 @@
package org.jboss.mq.il.jvm;
import java.util.Properties;
-import javax.naming.InitialContext;
import javax.management.*;
-
-import org.jboss.util.ServiceMBeanSupport;
-
-
-
-
-
+import javax.naming.InitialContext;
+import org.jboss.mq.GenericConnectionFactory;
import org.jboss.mq.il.ServerIL;
-import org.jboss.mq.GenericConnectionFactory;
import org.jboss.mq.il.ServerILJMXService;
import org.jboss.mq.server.JMSServer;
+import org.jboss.util.ServiceMBeanSupport;
+
/**
- * Implements the ServerILJMXService which is used to
- * manage the JVM IL.
- *
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @author David Maplesden ([EMAIL PROTECTED])
+ * Implements the ServerILJMXService which is used to manage the JVM IL.
*
- * @version $Revision: 1.1 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @author David Maplesden ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
public class JVMServerILService extends org.jboss.mq.il.ServerILJMXService
implements JVMServerILServiceMBean {
- /**
- * Gives this JMX service a name.
- */
- public String getName() {
- return "JBossMQ-JVMServerIL";
- }
-
- /**
- * Used to construct the GenericConnectionFactory (bindJNDIReferences() builds
it)
- * @returns ServerIL the instance of this IL
- */
- public ServerIL getServerIL() {
- return null;
- }
-
- /**
- * Starts this IL, and binds it to JNDI
- */
- public void startService() throws Exception {
-
- bindJNDIReferences();
-
- }
-
- /**
- * Stops this IL, and unbinds it from JNDI
- */
- public void stopService() {
- try {
- unbindJNDIReferences();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Used to construct the GenericConnectionFactory (bindJNDIReferences() builds
it)
- * Sets up the connection properties need by a client to use this
- * IL
- */
- public java.util.Properties getClientConnectionProperties() {
- Properties rc= new Properties();
- rc.setProperty(GenericConnectionFactory.CLIENT_IL_SERVICE_KEY,
"org.jboss.mq.il.jvm.JVMClientILService");
- rc.setProperty(GenericConnectionFactory.SERVER_IL_FACTORY_KEY,
"org.jboss.mq.il.jvm.JVMServerILFactory");
- return rc;
- }
-
- /**
- * Binds the connection factories for this IL
- * @throws javax.naming.NamingException it cannot be unbound
- */
- public void bindJNDIReferences() throws javax.naming.NamingException {
-
- GenericConnectionFactory gcf= new
GenericConnectionFactory(getServerIL(), getClientConnectionProperties());
- org.jboss.mq.SpyConnectionFactory scf= new
org.jboss.mq.SpyConnectionFactory(gcf);
- org.jboss.mq.SpyXAConnectionFactory sxacf= new
org.jboss.mq.SpyXAConnectionFactory(gcf);
-
- // Get an InitialContext
- InitialContext ctx = new InitialContext();
- org.jboss.naming.NonSerializableFactory.rebind(ctx,
getConnectionFactoryJNDIRef(), scf);
- org.jboss.naming.NonSerializableFactory.rebind(ctx,
getXAConnectionFactoryJNDIRef(), sxacf);
+ /**
+ * Gives this JMX service a name.
+ *
+ * @return The Name value
+ */
+ public String getName() {
+ return "JBossMQ-JVMServerIL";
+ }
+
+ /**
+ * Used to construct the GenericConnectionFactory (bindJNDIReferences()
+ * builds it)
+ *
+ * @return The ServerIL value
+ * @returns ServerIL the instance of this IL
+ */
+ public ServerIL getServerIL() {
+ return null;
+ }
+
+ /**
+ * Used to construct the GenericConnectionFactory (bindJNDIReferences()
+ * builds it) Sets up the connection properties need by a client to use this
+ * IL
+ *
+ * @return The ClientConnectionProperties value
+ */
+ public java.util.Properties getClientConnectionProperties() {
+ Properties rc = new Properties();
+ rc.setProperty( GenericConnectionFactory.CLIENT_IL_SERVICE_KEY,
"org.jboss.mq.il.jvm.JVMClientILService" );
+ rc.setProperty( GenericConnectionFactory.SERVER_IL_FACTORY_KEY,
"org.jboss.mq.il.jvm.JVMServerILFactory" );
+ return rc;
+ }
+
+ /**
+ * Starts this IL, and binds it to JNDI
+ *
+ * @exception Exception Description of Exception
+ */
+ public void startService()
+ throws Exception {
+
+ bindJNDIReferences();
+
+ }
+
+ /**
+ * Stops this IL, and unbinds it from JNDI
+ */
+ public void stopService() {
+ try {
+ unbindJNDIReferences();
+ } catch ( Exception e ) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Binds the connection factories for this IL
+ *
+ * @throws javax.naming.NamingException it cannot be unbound
+ */
+ public void bindJNDIReferences()
+ throws javax.naming.NamingException {
+
+ GenericConnectionFactory gcf = new GenericConnectionFactory( getServerIL(),
getClientConnectionProperties() );
+ org.jboss.mq.SpyConnectionFactory scf = new
org.jboss.mq.SpyConnectionFactory( gcf );
+ org.jboss.mq.SpyXAConnectionFactory sxacf = new
org.jboss.mq.SpyXAConnectionFactory( gcf );
+
+ // Get an InitialContext
+ InitialContext ctx = new InitialContext();
+ org.jboss.naming.NonSerializableFactory.rebind( ctx,
getConnectionFactoryJNDIRef(), scf );
+ org.jboss.naming.NonSerializableFactory.rebind( ctx,
getXAConnectionFactoryJNDIRef(), sxacf );
- }
-}
\ No newline at end of file
+ }
+}
1.2 +5 -5
jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerILServiceMBean.java
Index: JVMServerILServiceMBean.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/jvm/JVMServerILServiceMBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JVMServerILServiceMBean.java 2001/08/11 20:59:13 1.1
+++ JVMServerILServiceMBean.java 2001/08/17 03:04:03 1.2
@@ -9,9 +9,9 @@
import java.lang.Object;
/**
- * This interface is used to define which methods will be exposed
- * via JMX.
+ * This interface is used to define which methods will be exposed via JMX.
+ *
+ * @created August 16, 2001
*/
-public interface JVMServerILServiceMBean extends
org.jboss.mq.il.ServerILJMXServiceMBean
-{
-}
\ No newline at end of file
+public interface JVMServerILServiceMBean extends
org.jboss.mq.il.ServerILJMXServiceMBean {
+}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development