User: chirino 
  Date: 01/06/21 21:04:43

  Modified:    src/main/org/jbossmq/server StartServer.java
  Log:
  I have added an new "INVM" that can only be used when the JBossMQ server is
  running in the same machine as the client.  This INVM IL theoreticaly is the
  epitomy of performance since no serialization occurs and no threads are
  needs to poll for input.
  
  Revision  Changes    Path
  1.6       +18 -5     jbossmq/src/main/org/jbossmq/server/StartServer.java
  
  Index: StartServer.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/server/StartServer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StartServer.java  2001/05/22 07:29:02     1.5
  +++ StartServer.java  2001/06/22 04:04:43     1.6
  @@ -38,6 +38,8 @@
   import org.jbossmq.distributed.interfaces.DistributedConnectionFactory;
   import org.jbossmq.distributed.interfaces.DistributedJMSServer;
   
  +import org.jboss.naming.NonSerializableFactory;
  +
   /**
    *   Class used to start a JMS service.  This can be called from inside another
   
  @@ -48,7 +50,7 @@
    *   @author Vincent Sheffer ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    *
  - *   @version $Revision: 1.5 $
  + *   @version $Revision: 1.6 $
    */
   public class StartServer implements Runnable
   {
  @@ -234,10 +236,21 @@
                                new 
ObjectName("JMS:service=DistributedConnectionFactory,type="+name));
   
                                //(re)bind the connection factories in the JNDI 
namespace
  -                             
ctx.rebind(topicConnectionFactoryJNDI,invocationLayerFactory.spyTopicConnectionFactory);
  -                             
ctx.rebind(queueConnectionFactoryJNDI,invocationLayerFactory.spyQueueConnectionFactory);
  -                             
ctx.rebind(xaTopicConnectionFactoryJNDI,invocationLayerFactory.spyXATopicConnectionFactory);
  -                             
ctx.rebind(xaQueueConnectionFactoryJNDI,invocationLayerFactory.spyXAQueueConnectionFactory);
  +                             try {
  +                                     
ctx.rebind(topicConnectionFactoryJNDI,invocationLayerFactory.spyTopicConnectionFactory);
  +                                     
ctx.rebind(queueConnectionFactoryJNDI,invocationLayerFactory.spyQueueConnectionFactory);
  +                                     
ctx.rebind(xaTopicConnectionFactoryJNDI,invocationLayerFactory.spyXATopicConnectionFactory);
  +                                     
ctx.rebind(xaQueueConnectionFactoryJNDI,invocationLayerFactory.spyXAQueueConnectionFactory);
  +
  +                             // If the object could not be stored, it could be 
because it is only meant to
  +                             // be used for intra JVM usage...  Lets try to bind it 
using 
  +                             } catch ( javax.naming.CommunicationException ignore ) 
{
  +                                 // Try to store factorys as NonSerializable 
objects.
  +                                     
NonSerializableFactory.rebind(ctx,topicConnectionFactoryJNDI,invocationLayerFactory.spyTopicConnectionFactory);
  +                                     
NonSerializableFactory.rebind(ctx,queueConnectionFactoryJNDI,invocationLayerFactory.spyQueueConnectionFactory);
  +                                     
NonSerializableFactory.rebind(ctx,xaTopicConnectionFactoryJNDI,invocationLayerFactory.spyXATopicConnectionFactory);
  +                                     
NonSerializableFactory.rebind(ctx,xaQueueConnectionFactoryJNDI,invocationLayerFactory.spyXAQueueConnectionFactory);
  +                             }
   
                        }
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to