Java Doc for JBossTestSetup.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) 


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 $


Field Summary
protected  JBossTestServicesdelegate
    

Constructor Summary
public  JBossTestSetup(Test test)
    

Method Summary
protected  JBossTestServicescreateTestServices()
    
protected  voiddeploy(String name)
     Deploy a package with the main deployer.
protected  voidflushAuthCache()
    
protected  voidflushAuthCache(String domain)
    
protected  intgetBeanCount()
    
protected  URLgetDeployURL(String filename)
     Returns the deployment directory to use.
protected  ObjectNamegetDeployerName()
    
protected  InitialContextgetInitialContext()
    
protected  intgetIterationCount()
    
protected  StringgetJndiInitFactory()
    
protected  StringgetJndiURL()
    
protected  CategorygetLog()
    
protected  StringgetResourceURL(String path)
    
protected  MBeanServerConnectiongetServer()
    
public  StringgetServerHost()
    
protected  intgetThreadCount()
    
protected  voidinitDefaultLoginConfig()
     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.
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  voidredeploy(String name)
    
protected  voidrestartDBPool()
    
protected  voidundeploy(String name)
     Undeploy a package with the main deployer.

Field Detail
delegate
protected JBossTestServices delegate(Code)




Constructor Detail
JBossTestSetup
public JBossTestSetup(Test test) throws Exception(Code)
Constructor for the JBossTestCase object




Method Detail
createTestServices
protected JBossTestServices createTestServices()(Code)



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



flushAuthCache
protected void flushAuthCache() throws Exception(Code)



flushAuthCache
protected void flushAuthCache(String domain) throws Exception(Code)



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



getDeployerName
protected ObjectName getDeployerName() throws MalformedObjectNameException(Code)
Gets the DeployerName attribute of the JBossTestCase object The DeployerName value
exception:
  MalformedObjectNameException - 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)



getJndiURL
protected String getJndiURL()(Code)



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



getResourceURL
protected String getResourceURL(String path)(Code)



getServer
protected MBeanServerConnection getServer() throws Exception(Code)
Gets the Server attribute of the JBossTestCase object The Server 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



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



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



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