|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | 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 java.lang.String |
DEFAULT_LOGIN_CONFIG
|
static java.lang.String |
DEFAULT_PASSWORD
|
static int |
DEFAULT_THREADCOUNT
|
static java.lang.String |
DEFAULT_USERNAME
|
static java.lang.String |
DEPLOYER_NAME
|
protected javax.naming.InitialContext |
initialContext
|
protected java.util.Hashtable |
jndiEnv
|
protected javax.security.auth.login.LoginContext |
lc
|
protected Category |
log
|
protected RMIAdaptor (src) |
server
|
Constructor Summary | |
JBossTestServices(java.lang.String className)
Constructor for the JBossTestCase object |
Method Summary | |
void |
deploy(java.lang.String name)
Deploy a package with the main deployer. |
protected java.lang.String |
getDeployURL(java.lang.String filename)
Returns the deployment directory to use. |
RMIAdaptor (src) |
getServer()
Gets the Server attribute of the JBossTestCase object |
java.lang.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 java.lang.Object |
invoke(ObjectName (src) name,
java.lang.String method,
java.lang.Object[] args,
java.lang.String[] sig)
invoke wraps an invoke call to the mbean server in a lot of exception unwrapping. |
protected java.lang.Object |
invoke(RMIAdaptor (src) server,
ObjectName (src) name,
java.lang.String method,
java.lang.Object[] args,
java.lang.String[] sig)
|
void |
login()
Do a JAAS login with the current username, password and login config. |
void |
logout()
|
void |
redeploy(java.lang.String name)
|
void |
reinit()
|
void |
setUp()
The JUnit setup method |
void |
tearDown()
The teardown method for JUnit |
void |
undeploy(java.lang.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 java.lang.String DEPLOYER_NAME
public static final java.lang.String DEFAULT_USERNAME
public static final java.lang.String DEFAULT_PASSWORD
public static final java.lang.String DEFAULT_LOGIN_CONFIG
public static final int DEFAULT_THREADCOUNT
public static final int DEFAULT_ITERATIONCOUNT
public static final int DEFAULT_BEANCOUNT
protected RMIAdaptor (src) server
protected Category log
protected javax.naming.InitialContext initialContext
protected java.util.Hashtable jndiEnv
protected javax.security.auth.login.LoginContext lc
Constructor Detail |
public JBossTestServices(java.lang.String className)
className
- Test case nameMethod Detail |
public void setUp() throws java.lang.Exception
java.lang.Exception
public void tearDown() throws java.lang.Exception
java.lang.Exception
public RMIAdaptor (src) getServer() throws java.lang.Exception
java.lang.Exception
protected java.lang.String getDeployURL(java.lang.String filename) throws java.net.MalformedURLException
filename
- name of the file/url you want
java.net.MalformedURLException
- Description of Exceptionprotected java.lang.Object invoke(ObjectName (src) name, java.lang.String method, java.lang.Object[] args, java.lang.String[] sig) throws java.lang.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.
java.lang.Exception
- Description of Exceptionprotected java.lang.Object invoke(RMIAdaptor (src) server, ObjectName (src) name, java.lang.String method, java.lang.Object[] args, java.lang.String[] sig) throws java.lang.Exception
java.lang.Exception
public void deploy(java.lang.String name) throws java.lang.Exception
name
- filename/url of package to deploy.
java.lang.Exception
- Description of Exceptionpublic void redeploy(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void login() throws java.lang.Exception
java.lang.Exception
public void logout()
public void undeploy(java.lang.String name) throws java.lang.Exception
name
- filename/url of package to undeploy.
java.lang.Exception
- Description of Exceptionpublic void init() throws java.lang.Exception
java.lang.Exception
public void reinit() throws java.lang.Exception
java.lang.Exception
public java.lang.String getServerHost()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |