| org.jboss.test.JBossTestSetup
JBossTestSetup | public class JBossTestSetup extends TestSetup (Code) | | This is a TestSetup class for jboss junit test cases that provides the
jboss test services. It supplies
access to log4j logging, the jboss jmx server, jndi, and a method for
deploying ejb packages. You may supply the name of the machine the jboss
server is on with the system property jbosstest.server.name (default
getInetAddress().getLocalHost().getHostName()) and the directory for
deployable packages with the system property jbosstest.deploy.dir (default
../lib).
Should be sublassed to derive junit support for specific services integrated
into JBoss.
author: David Jencks author: Christoph G. Jung version: $Revision: 60041 $ |
JBossTestSetup | public JBossTestSetup(Test test) throws Exception(Code) | | Constructor for the JBossTestCase object
|
deploy | protected void deploy(String name) throws Exception(Code) | | Deploy a package with the main deployer. The supplied name is
interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
Parameters: name - filename/url of package to deploy. exception: Exception - Description of Exception |
getBeanCount | protected int getBeanCount()(Code) | | |
getDeployURL | protected URL getDeployURL(String filename) throws MalformedURLException(Code) | | Returns the deployment directory to use. This does it's best to figure out
where you are looking. If you supply a complete url, it returns it.
Otherwise, it looks for jbosstest.deploy.dir or if missing ../lib. Then it
tries to construct a file url or a url.
Parameters: filename - name of the file/url you want A more or less canonical string for the url. exception: MalformedURLException - Description of Exception |
getInitialContext | protected InitialContext getInitialContext() throws Exception(Code) | | Gets the InitialContext attribute of the JBossTestCase object
The InitialContext value |
getIterationCount | protected int getIterationCount()(Code) | | |
getJndiInitFactory | protected String getJndiInitFactory()(Code) | | |
getLog | protected Category getLog()(Code) | | Gets the Log attribute of the JBossTestCase object
The Log value |
getServerHost | public String getServerHost()(Code) | | Get the JBoss server host from system property "jbosstest.host.name"
This defaults to "localhost"
|
getThreadCount | protected int getThreadCount()(Code) | | |
initDefaultLoginConfig | protected void initDefaultLoginConfig()(Code) | | Validate the java.security.auth.login.config setting, and if not
found, set it to the security/auth.conf classpath resource value
if that exists.
throws: IllegalStateException - if neither java.security.auth.login.configis set and no security/auth.conf classpath resource exists. |
invoke | protected Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception(Code) | | invoke wraps an invoke call to the mbean server in a lot of exception
unwrapping.
Parameters: name - ObjectName of the mbean to be called Parameters: method - mbean method to be called Parameters: args - Object[] of arguments for the mbean method. Parameters: sig - String[] of types for the mbean methods parameters. Object returned by mbean method invocation. exception: Exception - Description of Exception |
restartDBPool | protected void restartDBPool() throws Exception(Code) | | Restart the connection pool associated with the DefaultDS
throws: Exception - on failure |
undeploy | protected void undeploy(String name) throws Exception(Code) | | Undeploy a package with the main deployer. The supplied name is
interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
Parameters: name - filename/url of package to undeploy. exception: Exception - Description of Exception |
|
|