[jboss-cvs] jboss-jms/tests/src/org/jboss/test/messaging/tools/jmx/rmi ...
Timothy Fox
tim.fox at jboss.com
Mon Jul 17 13:15:04 EDT 2006
User: timfox
Date: 06/07/17 13:15:04
Modified: tests/src/org/jboss/test/messaging/tools/jmx/rmi
LocalTestServer.java RMITestServer.java Server.java
Log:
Many changes including implementation of prefetch, SEDAisation of server, changing of recovery
Revision Changes Path
1.13 +18 -15 jboss-jms/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LocalTestServer.java
===================================================================
RCS file: /cvsroot/jboss/jboss-jms/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- LocalTestServer.java 2 May 2006 02:44:45 -0000 1.12
+++ LocalTestServer.java 17 Jul 2006 17:15:04 -0000 1.13
@@ -69,7 +69,6 @@
private ServiceContainer sc;
// service dependencies
- private ObjectName threadPoolObjectName;
private ObjectName persistenceManagerObjectName;
private ObjectName messageStoreObjectName;
private ObjectName channelMapperObjectName;
@@ -259,12 +258,6 @@
sc.invoke(persistenceManagerObjectName, "create", new Object[0], new String[0]);
sc.invoke(persistenceManagerObjectName, "start", new Object[0], new String[0]);
- MBeanConfigurationElement threadPoolConfig =
- (MBeanConfigurationElement)mdd.query("service", "ThreadPool").iterator().next();
- threadPoolObjectName = sc.registerAndConfigureService(threadPoolConfig);
- sc.invoke(threadPoolObjectName, "create", new Object[0], new String[0]);
- sc.invoke(threadPoolObjectName, "start", new Object[0], new String[0]);
-
MBeanConfigurationElement messageStoreConfig =
(MBeanConfigurationElement)mdd.query("service", "MessageStore").iterator().next();
messageStoreObjectName = sc.registerAndConfigureService(messageStoreConfig);
@@ -388,9 +381,6 @@
sc.invoke(persistenceManagerObjectName, "destroy", new Object[0], new String[0]);
sc.unregisterService(persistenceManagerObjectName);
- sc.invoke(threadPoolObjectName, "stop", new Object[0], new String[0]);
- sc.invoke(threadPoolObjectName, "destroy", new Object[0], new String[0]);
- sc.unregisterService(threadPoolObjectName);
}
public boolean isServerPeerStarted() throws Exception
@@ -565,14 +555,27 @@
public void deployConnectionFactory(String objectName,
String[] jndiBindings) throws Exception
{
+ deployConnectionFactory(objectName, jndiBindings, -1);
+ }
+
+ public void deployConnectionFactory(String objectName,
+ String[] jndiBindings,
+ int prefetchSize) throws Exception
+ {
String config =
"<mbean code=\"org.jboss.jms.server.connectionfactory.ConnectionFactory\"\n" +
"name=\"" + objectName + "\"\n" +
"xmbean-dd=\"xmdesc/ConnectionFactory-xmbean.xml\">\n" +
"<depends optional-attribute-name=\"ServerPeer\">jboss.messaging:service=ServerPeer</depends>\n" +
"<depends optional-attribute-name=\"Connector\">" + ServiceContainer.REMOTING_OBJECT_NAME +
- "</depends>\n" +
- "<attribute name=\"JNDIBindings\"><bindings>";
+ "</depends>\n";
+
+ if (prefetchSize != -1)
+ {
+ config += "<attribute name=\"PrefetchSize\">" + prefetchSize + "</attribute>";
+ }
+
+ config += "<attribute name=\"JNDIBindings\"><bindings>";
for(int i = 0; i < jndiBindings.length; i++)
{
1.9 +5 -0 jboss-jms/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMITestServer.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RMITestServer.java
===================================================================
RCS file: /cvsroot/jboss/jboss-jms/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMITestServer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- RMITestServer.java 2 May 2006 02:44:45 -0000 1.8
+++ RMITestServer.java 17 Jul 2006 17:15:04 -0000 1.9
@@ -150,6 +150,11 @@
server.deployConnectionFactory(objectName, jndiBindings);
}
+ public void deployConnectionFactory(String objectName, String[] jndiBindings, int prefetchSize) throws Exception
+ {
+ server.deployConnectionFactory(objectName, jndiBindings, prefetchSize);
+ }
+
public void undeployConnectionFactory(ObjectName objectName) throws Exception
{
server.undeployConnectionFactory(objectName);
1.22 +7 -3 jboss-jms/tests/src/org/jboss/test/messaging/tools/jmx/rmi/Server.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Server.java
===================================================================
RCS file: /cvsroot/jboss/jboss-jms/tests/src/org/jboss/test/messaging/tools/jmx/rmi/Server.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- Server.java 2 May 2006 02:44:45 -0000 1.21
+++ Server.java 17 Jul 2006 17:15:04 -0000 1.22
@@ -38,9 +38,9 @@
* The remote interface exposed by TestServer.
*
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision: 1.21 $</tt>
+ * @version <tt>$Revision: 1.22 $</tt>
*
- * $Id: Server.java,v 1.21 2006/05/02 02:44:45 ovidiu Exp $
+ * $Id: Server.java,v 1.22 2006/07/17 17:15:04 timfox Exp $
*/
public interface Server extends Remote
{
@@ -135,7 +135,11 @@
void deployQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception;
void undeployDestination(boolean isQueue, String name) throws Exception;
- void deployConnectionFactory(String objectName, String[] jndiBindings) throws Exception;
+ void deployConnectionFactory(String objectName,
+ String[] jndiBindings,
+ int prefetchSize) throws Exception;
+ void deployConnectionFactory(String objectName,
+ String[] jndiBindings) throws Exception;
void undeployConnectionFactory(ObjectName objectName) throws Exception;
/**
More information about the jboss-cvs-commits
mailing list