User: pkendall
Date: 01/07/29 16:34:21
Added: src/main/org/jbossmq/il/jvm JVMServerILFactory.java
Log:
bugfixes, null pointer exception becuase JMSServer is transient and not serializable.
Used to construct JVMServerIL.
Revision Changes Path
1.1 jbossmq/src/main/org/jbossmq/il/jvm/JVMServerILFactory.java
Index: JVMServerILFactory.java
===================================================================
/*
* JBossMQ, the OpenSource JMS implementation
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jbossmq.il.jvm;
import java.util.Properties;
import org.jbossmq.il.ServerILFactory;
import org.jbossmq.il.ServerIL;
import org.jbossmq.il.ServerILJMXService;
import org.jbossmq.server.JMSServer;
import javax.management.*;
import org.jboss.util.ServiceMBeanSupport;
/**
* Implements the ServerILFactory interface to create a new JVMServerIL
*
* @author David Maplesden
* @version $Revision: 1.1 $
*/
public class JVMServerILFactory extends ServiceMBeanSupport implements
ServerILFactory {
public void init(Properties init){
}
public String getName(){
return "JVMServerILFactory";
}
/**
* Used to construct the GenericConnectionFactory (bindJNDIReferences() builds
it)
* @returns ServerIL the instance of this IL
*/
public ServerIL getServerIL() throws Exception{
return new JVMServerIL(lookupJMSServer());
}
/**
* @param finds the JMSServer instance via JNDI
* @throws javax.naming.NamingException if the server is not found
*/
public JMSServer lookupJMSServer() throws Exception {
return (JMSServer)getServer().invoke(new
ObjectName(org.jbossmq.server.JBossMQServiceMBean.OBJECT_NAME), "getJMSServer", new
Object[] {}, new String[] {} );
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development