Java Doc for JBossTestServices.java in  » EJB-Server-JBoss-4.2.1 » test » org » jboss » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » test » org.jboss.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.test.JBossTestServices

JBossTestServices
public class JBossTestServices (Code)
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.
author:
   David Jencks
author:
   Christoph G. Jung
author:
   Scott Stark
version:
   $Revision: 57221 $


Field Summary
final public static  intDEFAULT_BEANCOUNT
    
final public static  intDEFAULT_ITERATIONCOUNT
    
final public static  StringDEFAULT_LOGIN_CONFIG
    
final public static  StringDEFAULT_PASSWORD
    
final public static  intDEFAULT_THREADCOUNT
    
final public static  StringDEFAULT_USERNAME
    
final public static  StringDEPLOYER_NAME
    
protected  InitialContextinitialContext
    
protected  HashtablejndiEnv
    
protected  LoginContextlc
    
protected  Categorylog
    
protected  MBeanServerConnectionserver
    

Constructor Summary
public  JBossTestServices(String className)
    

Method Summary
public  voiddeploy(String name)
     Deploy a package with the main deployer.
 voidflushAuthCache(String domain)
    
 intgetBeanCount()
    
protected  URLgetDeployURL(String filename)
     Returns the deployment directory to use.
 ObjectNamegetDeployerName()
    
public  InitialContextgetInitialContext()
    
 intgetIterationCount()
    
 StringgetJndiInitFactory()
    
 StringgetJndiURL()
    
 CategorygetLog()
    
 StringgetLoginConfig()
    
 StringgetPassword()
    
public  MBeanServerConnectiongetServer()
    
public  StringgetServerHost()
    
 intgetThreadCount()
    
 StringgetUsername()
    
public  voidinit()
     Initializes the InitialContext if not set.
protected  Objectinvoke(ObjectName name, String method, Object[] args, String[] sig)
     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.
protected  Objectinvoke(MBeanServerConnection server, ObjectName name, String method, Object[] args, String[] sig)
    
 booleanisSecure()
    
public  voidlogin()
     Do a JAAS login with the current username, password and login config.
public  voidlogout()
    
public  voidredeploy(String name)
    
public  voidreinit()
     Re-initializes the InitialContext .
 voidrestartDBPool()
    
public  voidsetUp()
    
public  voidtearDown()
    
public  voidundeploy(String name)
     Undeploy a package with the main deployer.

Field Detail
DEFAULT_BEANCOUNT
final public static int DEFAULT_BEANCOUNT(Code)



DEFAULT_ITERATIONCOUNT
final public static int DEFAULT_ITERATIONCOUNT(Code)



DEFAULT_LOGIN_CONFIG
final public static String DEFAULT_LOGIN_CONFIG(Code)



DEFAULT_PASSWORD
final public static String DEFAULT_PASSWORD(Code)



DEFAULT_THREADCOUNT
final public static int DEFAULT_THREADCOUNT(Code)



DEFAULT_USERNAME
final public static String DEFAULT_USERNAME(Code)



DEPLOYER_NAME
final public static String DEPLOYER_NAME(Code)



initialContext
protected InitialContext initialContext(Code)



jndiEnv
protected Hashtable jndiEnv(Code)



lc
protected LoginContext lc(Code)



log
protected Category log(Code)



server
protected MBeanServerConnection server(Code)




Constructor Detail
JBossTestServices
public JBossTestServices(String className)(Code)
Constructor for the JBossTestCase object
Parameters:
  className - Test case name




Method Detail
deploy
public 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



flushAuthCache
void flushAuthCache(String domain) throws Exception(Code)
Flush all authentication credentials for the java:/jaas/other security domain



getBeanCount
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 URL
exception:
  MalformedURLException - Description of Exception



getDeployerName
ObjectName getDeployerName() throws MalformedObjectNameException(Code)
Gets the Main Deployer Name attribute of the JBossTestCase object The Main DeployerName value
exception:
  MalformedObjectNameException - Description of Exception



getInitialContext
public InitialContext getInitialContext() throws Exception(Code)
Gets the InitialContext attribute of the JBossTestCase object The InitialContext value



getIterationCount
int getIterationCount()(Code)



getJndiInitFactory
String getJndiInitFactory()(Code)



getJndiURL
String getJndiURL()(Code)



getLog
Category getLog()(Code)
Gets the Log attribute of the JBossTestCase object The Log value



getLoginConfig
String getLoginConfig()(Code)



getPassword
String getPassword()(Code)



getServer
public MBeanServerConnection getServer() throws Exception(Code)
Gets the Server attribute of the JBossTestCase object The Server value



getServerHost
public String getServerHost()(Code)
Returns the JBoss server host from system property "jbosstest.server.host" This defaults to "localhost"



getThreadCount
int getThreadCount()(Code)



getUsername
String getUsername()(Code)



init
public void init() throws Exception(Code)
Initializes the InitialContext if not set.



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



invoke
protected Object invoke(MBeanServerConnection server, ObjectName name, String method, Object[] args, String[] sig) throws Exception(Code)



isSecure
boolean isSecure()(Code)



login
public void login() throws Exception(Code)
Do a JAAS login with the current username, password and login config.
throws:
  Exception -



logout
public void logout()(Code)



redeploy
public void redeploy(String name) throws Exception(Code)



reinit
public void reinit() throws Exception(Code)
Re-initializes the InitialContext .



restartDBPool
void restartDBPool() throws Exception(Code)



setUp
public void setUp() throws Exception(Code)
The JUnit setup method



tearDown
public void tearDown() throws Exception(Code)
The teardown method for JUnit



undeploy
public 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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.