User: user57
Date: 01/07/31 22:19:47
Modified: src/main/org/jbossmq/il/jvm Tag: jboss_buildmagic
JVMServerIL.java JVMServerILService.java
Added: src/main/org/jbossmq/il/jvm Tag: jboss_buildmagic
JVMServerILFactory.java
Log:
o updated from HEAD
Revision Changes Path
No revision
No revision
1.2.2.1 +12 -11 jbossmq/src/main/org/jbossmq/il/jvm/JVMServerIL.java
Index: JVMServerIL.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/jvm/JVMServerIL.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- JVMServerIL.java 2001/07/16 02:51:45 1.2
+++ JVMServerIL.java 2001/08/01 05:19:47 1.2.2.1
@@ -17,35 +17,36 @@
import org.jbossmq.SpyMessage;
import org.jbossmq.AcknowledgementRequest;
import org.jbossmq.SpyDestination;
+import org.jbossmq.Subscription;
import org.jbossmq.ConnectionToken;
import org.jbossmq.il.ServerIL;
import org.jbossmq.server.JMSServer;
/**
* The JVM implementation of the ServerIL object
- *
+ *
* @author Hiram Chirino ([EMAIL PROTECTED])
* @author Norbert Lataille ([EMAIL PROTECTED])
- *
+ *
* @version $Revision$
*/
-public class JVMServerIL implements ServerIL, java.io.Serializable {
+public class JVMServerIL implements ServerIL {
//The server implementation
- transient private JMSServer server;
+ private JMSServer server;
public JVMServerIL(JMSServer s) {
server= s;
}
/**
- * No need to clone because there are no instance variables tha can get
+ * No need to clone because there are no instance variables that 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
}
@@ -55,7 +56,7 @@
}
public void addMessage(ConnectionToken dc, SpyMessage val) throws JMSException
{
- server.addMessage(dc, val);
+ server.addMessage(dc, val.myClone());
}
public Topic createTopic(ConnectionToken dc, String dest) throws JMSException {
@@ -114,11 +115,11 @@
return server.checkUser(userName, password);
}
- public void subscribe(ConnectionToken dc, org.jbossmq.Subscription s) throws
Exception {
- server.subscribe(dc, s);
+ public void subscribe(ConnectionToken dc, Subscription s) throws Exception {
+ server.subscribe(dc, s.myClone());
}
- public void transact(org.jbossmq.ConnectionToken dc, TransactionRequest t)
throws JMSException {
+ public void transact(ConnectionToken dc, TransactionRequest t) throws
JMSException {
server.transact(dc, t);
}
1.2.2.1 +20 -4 jbossmq/src/main/org/jbossmq/il/jvm/JVMServerILService.java
Index: JVMServerILService.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/jvm/JVMServerILService.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- JVMServerILService.java 2001/07/16 02:51:45 1.2
+++ JVMServerILService.java 2001/08/01 05:19:47 1.2.2.1
@@ -26,7 +26,6 @@
*/
public class JVMServerILService extends ServerILJMXService implements
JVMServerILServiceMBean {
- JVMServerIL serverIL;
/**
* Gives this JMX service a name.
@@ -40,7 +39,7 @@
* @returns ServerIL the instance of this IL
*/
public ServerIL getServerIL() {
- return serverIL;
+ return null;
}
/**
@@ -48,7 +47,6 @@
*/
public void startService() throws Exception {
- serverIL= new JVMServerIL(lookupJMSServer());
bindJNDIReferences();
}
@@ -72,6 +70,24 @@
public java.util.Properties getClientConnectionProperties() {
Properties rc= new Properties();
rc.setProperty(GenericConnectionFactory.CLIENT_IL_SERVICE_KEY,
"org.jbossmq.il.jvm.JVMClientILService");
+ rc.setProperty(GenericConnectionFactory.SERVER_IL_FACTORY_KEY,
"org.jbossmq.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.jbossmq.SpyConnectionFactory scf= new
org.jbossmq.SpyConnectionFactory(gcf);
+ org.jbossmq.SpyXAConnectionFactory sxacf= new
org.jbossmq.SpyXAConnectionFactory(gcf);
+
+ // Get an InitialContext
+ InitialContext ctx = new InitialContext();
+ org.jboss.naming.NonSerializableFactory.rebind(ctx,
getConnectionFactoryJNDIRef(), scf);
+ org.jboss.naming.NonSerializableFactory.rebind(ctx,
getXAConnectionFactoryJNDIRef(), scf);
+
}
}
No revision
No revision
1.1.2.1 +1 -1 jbossmq/src/main/org/jbossmq/il/jvm/JVMServerILFactory.java
Index: JVMServerILFactory.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmq/src/main/org/jbossmq/il/jvm/JVMServerILFactory.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development