|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.test.JBossTestServices
This is provides services for jboss junit test cases and TestSetups. It supplies access to log4j logging, the jboss jmx server, jndi, and a method for deploying ejb packages. You may supply the JNDI name under which the RMIAdaptor interface is located via the system property jbosstest.server.name default (jmx/rmi/RMIAdaptor) and the directory for deployable packages with the system property jbosstest.deploy.dir (default ../lib). Should be subclassed to derive junit support for specific services integrated into jboss.
| Field Summary | |
static int |
DEFAULT_BEANCOUNT
|
static int |
DEFAULT_ITERATIONCOUNT
|
static String |
DEFAULT_LOGIN_CONFIG
|
static String |
DEFAULT_PASSWORD
|
static int |
DEFAULT_THREADCOUNT
|
static String |
DEFAULT_USERNAME
|
static String |
DEPLOYER_NAME
|
protected InitialContext |
initialContext
|
protected Hashtable |
jndiEnv
|
protected LoginContext |
lc
|
protected org.apache.log4j.Category |
log
|
protected javax.management.MBeanServerConnection |
server
|
| Constructor Summary | |
JBossTestServices(String className)
Constructor for the JBossTestCase object |
|
| Method Summary | |
void |
deploy(String name)
Deploy a package with the main deployer. |
protected String |
getDeployURL(String filename)
Returns the deployment directory to use. |
javax.management.MBeanServerConnection |
getServer()
Gets the Server attribute of the JBossTestCase object |
String |
getServerHost()
Get the JBoss server host from system property "jbosstest.server.host" This defaults to "localhost" |
void |
init()
Lookup the RMIAdaptor interface from JNDI. |
protected Object |
invoke(javax.management.MBeanServerConnection server,
javax.management.ObjectName name,
String method,
Object[] args,
String[] sig)
|
protected Object |
invoke(javax.management.ObjectName name,
String method,
Object[] args,
String[] sig)
invoke wraps an invoke call to the mbean server in a lot of exception unwrapping. |
void |
login()
Do a JAAS login with the current username, password and login config. |
void |
logout()
|
void |
redeploy(String name)
|
void |
reinit()
|
void |
setUp()
The JUnit setup method |
void |
tearDown()
The teardown method for JUnit |
void |
undeploy(String name)
Undeploy a package with the main deployer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String DEPLOYER_NAME
public static final String DEFAULT_USERNAME
public static final String DEFAULT_PASSWORD
public static final String DEFAULT_LOGIN_CONFIG
public static final int DEFAULT_THREADCOUNT
public static final int DEFAULT_ITERATIONCOUNT
public static final int DEFAULT_BEANCOUNT
protected javax.management.MBeanServerConnection server
protected org.apache.log4j.Category log
protected InitialContext initialContext
protected Hashtable jndiEnv
protected LoginContext lc
| Constructor Detail |
public JBossTestServices(String className)
className - Test case name| Method Detail |
public void setUp()
throws Exception
Exception
public void tearDown()
throws Exception
Exception
public javax.management.MBeanServerConnection getServer()
throws Exception
Exception
protected String getDeployURL(String filename)
throws MalformedURLException
filename - name of the file/url you want
MalformedURLException - Description of Exception
protected Object invoke(javax.management.ObjectName name,
String method,
Object[] args,
String[] sig)
throws Exception
name - ObjectName of the mbean to be calledmethod - mbean method to be calledargs - Object[] of arguments for the mbean method.sig - String[] of types for the mbean methods parameters.
Exception - Description of Exception
protected Object invoke(javax.management.MBeanServerConnection server,
javax.management.ObjectName name,
String method,
Object[] args,
String[] sig)
throws Exception
Exception
public void deploy(String name)
throws Exception
name - filename/url of package to deploy.
Exception - Description of Exception
public void redeploy(String name)
throws Exception
Exception
public void login()
throws Exception
Exceptionpublic void logout()
public void undeploy(String name)
throws Exception
name - filename/url of package to undeploy.
Exception - Description of Exception
public void init()
throws Exception
Exception
public void reinit()
throws Exception
Exceptionpublic String getServerHost()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||