Java Doc for JonasAdminTestCase.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » jonasadmin » test » util » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.jonasadmin.test.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase

All known Subclasses:   org.objectweb.jonas.jonasadmin.test.service.security.F_JonasAdminServiceSecurity,  org.objectweb.jonas.jonasadmin.test.service.mail.C_JonasAdminServiceMail,  org.objectweb.jonas.jonasadmin.test.domain.C_JonasAdminDomain,  org.objectweb.jonas.jonasadmin.test.service.resource.C_JonasAdminServiceResource,  org.objectweb.jonas.jonasadmin.test.service.container.F_JonasAdminWebContainer,  org.objectweb.jonas.jonasadmin.test.deploy.F_JonasAdminDeployRar,  org.objectweb.jonas.jonasadmin.test.deploy.F_JonasAdminDeployJar,  org.objectweb.jonas.jonasadmin.test.monitoring.F_JonasAdminActivatedMonitoring,  org.objectweb.jonas.jonasadmin.test.joram.F_JonasAdminJoramProperties,  org.objectweb.jonas.jonasadmin.test.jonasserver.C_JonasAdminJonasserver,  org.objectweb.jonas.jonasadmin.test.service.security.C_JonasAdminServiceSecurity,  org.objectweb.jonas.jonasadmin.test.joram.F_JonasAdminJoramDestination,  org.objectweb.jonas.jonasadmin.test.deploy.F_JonasAdminDeploy,  org.objectweb.jonas.jonasadmin.test.service.container.C_JonasAdminContainer,  org.objectweb.jonas.jonasadmin.test.deploy.F_JonasAdminDeployWar,  org.objectweb.jonas.jonasadmin.test.monitoring.F_JonasAdminRange,  org.objectweb.jonas.jonasadmin.test.service.discovery.F_JonasAdminDiscovery,  org.objectweb.jonas.jonasadmin.test.service.container.F_JonasAdminEjbContainer,  org.objectweb.jonas.jonasadmin.test.service.resource.F_JonasAdminResource,  org.objectweb.jonas.jonasadmin.test.resource.C_JonasAdminResource,  org.objectweb.jonas.jonasadmin.test.service.discovery.C_JonasAdminServiceDiscovery,  org.objectweb.jonas.jonasadmin.test.service.mail.F_JonasAdminServiceMail,  org.objectweb.jonas.jonasadmin.test.resource.F_JonasAdminResourceDatasource,  org.objectweb.jonas.jonasadmin.test.navigation.C_JonasAdminNavigation,  org.objectweb.jonas.jonasadmin.test.logging.C_JonasAdminLogging,  org.objectweb.jonas.jonasadmin.test.jonasserver.F_JonasAdminInfoServer,  org.objectweb.jonas.jonasadmin.test.catalina.C_JonasAdminCatalina,  org.objectweb.jonas.jonasadmin.test.monitoring.F_JonasAdminNumberOfMeasures,  org.objectweb.jonas.jonasadmin.test.domain.F_JonasAdminDomain,  org.objectweb.jonas.jonasadmin.test.service.database.F_JonasAdminDatabase,  org.objectweb.jonas.jonasadmin.test.suite.C_JonasAdmin,  org.objectweb.jonas.jonasadmin.test.joram.F_JonasAdminJoramUser,  org.objectweb.jonas.jonasadmin.test.service.database.C_JonasAdminServiceDatabase,  org.objectweb.jonas.jonasadmin.test.monitoring.C_JonasAdminMonitoring,  org.objectweb.jonas.jonasadmin.test.logging.F_JonasAdminLogger,  org.objectweb.jonas.jonasadmin.test.deploy.C_JonasAdminDeploy,  org.objectweb.jonas.jonasadmin.test.service.jtm.C_JonasAdminServiceTransaction,  org.objectweb.jonas.jonasadmin.test.service.container.F_JonasAdminApplicationContainer,  org.objectweb.jonas.jonasadmin.test.resource.F_JonasAdminResourceMail,  org.objectweb.jonas.jonasadmin.test.navigation.F_JonasAdminNavigation,  org.objectweb.jonas.jonasadmin.test.joram.C_JonasAdminJoram,  org.objectweb.jonas.jonasadmin.test.service.jtm.F_JonasAdminServiceTransaction,  org.objectweb.jonas.jonasadmin.test.jonasserver.F_JonasAdminSaveAll,  org.objectweb.jonas.jonasadmin.test.template.F_JonasAdminTemplate,  org.objectweb.jonas.jonasadmin.test.navigation.F_JonasAdminLogout,  org.objectweb.jonas.jonasadmin.test.catalina.F_JonasAdminConnector,  org.objectweb.jonas.jonasadmin.test.template.C_JonasAdminTemplate,  org.objectweb.jonas.jonasadmin.test.domain.F_JonasAdminDomainAddServer,
JonasAdminTestCase
public class JonasAdminTestCase extends TestCase (Code)
Define a class to add useful methods for test the examples - Deploy ear, war and beans - Retrieve initial context
author:
   Florent Benoit


Field Summary
final protected static  StringFRAME_CONTENT
    
final protected static  StringFRAME_TOP
    
final protected static  StringFRAME_TREE
    
final protected static  StringURL_JONASADMIN
    
final protected static  StringURL_JONASADMIN_DEPLOYEAR
    
final protected static  StringURL_JONASADMIN_DEPLOYJAR
    
protected  PropertiesconfigFile
    
protected  JPropertiesjProp
    
protected  Stringport
    
protected  StringprefixUrl
    
protected  Stringurl
    
protected  StringurlLogOut
    
protected  StringurlWelcome
    
protected static  WebConversationwc
    

Constructor Summary
public  JonasAdminTestCase(String s)
    
public  JonasAdminTestCase(String s, String url)
    

Method Summary
protected  voidcallMainMethod(String classToLoad)
    
protected  voidcallMainMethod(String classToLoad, String[] args)
    
protected  voidcloseMBeanServer()
    
protected  voidcreateLocalJmsUser(String name, String password)
    
protected  voidcreateMailFactory(String mailFactory, Properties properties)
    
protected  voidcreateQueue(String name, int idString)
    
protected  voidcreateTopic(String name, int idString)
    
public  voiddebug(String msg)
    
protected  StringgetAbsoluteUrl(String url)
    
protected  IntegergetIntegerMBeanAttribute(ObjectName on, String attName)
    
protected  ObjectNamegetJCAConnectionFactory(String name, String jcaResourceName)
    
protected  MBeanServerConnectiongetMBeanServer()
    
protected  StringgetStringMBeanAttribute(ObjectName on, String attName)
    
protected  StringgetTime()
    
protected  booleanisDatabaseService()
    
protected  booleanisInMailFactoryList(String mailFactory)
    
protected  booleanisJoramRar()
    
protected  booleanisLoadedDatasource(String datasource)
    
public  booleanisRarLoaded(String filename)
    
protected  voidsetUp()
     Common setUp routine, used for every test.
public  voidtearDown()
    
protected  voidtestTabs(WebTable tabTable, int nbTabs, int selectedTab, String msg)
    
protected  voidunBindMailFactory(String mailFactory)
    
public  voidunUseBeans(String filename)
    
protected  voidunUseDatasource(String datasource)
    
public  voidunUseEar(String filename)
    
protected  voidundeployAll(WebResponse wr)
    
protected  voidundeployAllEar()
    
protected  voidundeployAllJar()
    
protected  voidundeployEar(String name)
    
public  voiduseBeans(String filename)
    
protected  voiduseDatasource(String datasource, Properties properties)
    
public  voiduseEar(String filename)
    
public  voiduseRar(String filename)
    
public  voiduseWar(String filename)
    

Field Detail
FRAME_CONTENT
final protected static String FRAME_CONTENT(Code)
NAME of FRAME content



FRAME_TOP
final protected static String FRAME_TOP(Code)
NAME of FRAME top



FRAME_TREE
final protected static String FRAME_TREE(Code)
NAME of FRAME tree



URL_JONASADMIN
final protected static String URL_JONASADMIN(Code)
URL of the login page



URL_JONASADMIN_DEPLOYEAR
final protected static String URL_JONASADMIN_DEPLOYEAR(Code)
URL of the deployment of EARs



URL_JONASADMIN_DEPLOYJAR
final protected static String URL_JONASADMIN_DEPLOYJAR(Code)
URL of the deployment of JARs



configFile
protected Properties configFile(Code)
jonasAdmin test properties



jProp
protected JProperties jProp(Code)
JOnAS and jonasAdmin properties



port
protected String port(Code)
jonasAdmin port



prefixUrl
protected String prefixUrl(Code)
Prefix for build URLs



url
protected String url(Code)
URL used for the constructor



urlLogOut
protected String urlLogOut(Code)
URL used to log out



urlWelcome
protected String urlWelcome(Code)
URL used to return to Welcome.jsp



wc
protected static WebConversation wc(Code)
Conversation used for HttpUnit




Constructor Detail
JonasAdminTestCase
public JonasAdminTestCase(String s)(Code)
Constructor with a specified name
Parameters:
  s - the name



JonasAdminTestCase
public JonasAdminTestCase(String s, String url)(Code)
Constructor with a specified name and url
Parameters:
  s - the name
Parameters:
  url - the url which can be used




Method Detail
callMainMethod
protected void callMainMethod(String classToLoad) throws Exception(Code)
Call the main method of a specific class with empty args
Parameters:
  classToLoad - name of class which contains the main method
throws:
  Exception - if it fails



callMainMethod
protected void callMainMethod(String classToLoad, String[] args) throws Exception(Code)
Call the main method of a specific class and the specific args
Parameters:
  classToLoad - name of class which contains the main method
Parameters:
  args - args to give to the main method
throws:
  Exception - if it fails



closeMBeanServer
protected void closeMBeanServer() throws Exception(Code)
Close MBean Server connection
throws:
  Exception - if an error occurs



createLocalJmsUser
protected void createLocalJmsUser(String name, String password) throws Exception(Code)
Create a user in a joram server
Parameters:
  name - name of the user
Parameters:
  password - password of the user
throws:
  Exception - if an error occurs



createMailFactory
protected void createMailFactory(String mailFactory, Properties properties) throws Exception(Code)
Create a mail factory in jonas server
Parameters:
  mail - factory name of the datasource
Parameters:
  properties - properties of the mail factory
throws:
  Exception - if an error occurs



createQueue
protected void createQueue(String name, int idString) throws Exception(Code)
Create a queue in a joram server
Parameters:
  name - name of the queue
Parameters:
  idString - id of the current joram server
throws:
  Exception - if an error occurs



createTopic
protected void createTopic(String name, int idString) throws Exception(Code)
Create a topic in a joram server
Parameters:
  name - name of the topic
Parameters:
  idString - id of the current joram server
throws:
  Exception - if an error occurs



debug
public void debug(String msg)(Code)
Print a debug message
Parameters:
  msg - The message



getAbsoluteUrl
protected String getAbsoluteUrl(String url)(Code)
Add to the specified url the prefix
Parameters:
  url - relative URL absolute path of URL



getIntegerMBeanAttribute
protected Integer getIntegerMBeanAttribute(ObjectName on, String attName) throws Exception(Code)



getJCAConnectionFactory
protected ObjectName getJCAConnectionFactory(String name, String jcaResourceName)(Code)



getMBeanServer
protected MBeanServerConnection getMBeanServer() throws Exception(Code)
Get MBean Server connection a MBeanServer Connection
throws:
  Exception - if an error occurs



getStringMBeanAttribute
protected String getStringMBeanAttribute(ObjectName on, String attName) throws Exception(Code)



getTime
protected String getTime()(Code)
Get current time A String Time with the format yyyy-MM-dd.HH-mm-ss



isDatabaseService
protected boolean isDatabaseService() throws Exception(Code)
Check if database service is started (dbm) true if dbm started
throws:
  Exception - if an error occurs



isInMailFactoryList
protected boolean isInMailFactoryList(String mailFactory) throws Exception(Code)
Return if the mail factory is in mail factory list
Parameters:
  mailFactory - the name of the mail factory true if the mail factory is in list, false else.
throws:
  Exception - if an error occurs.



isJoramRar
protected boolean isJoramRar() throws Exception(Code)
Check if the Joram RAR is deplyed true if dbm started
throws:
  Exception - if an error occurs



isLoadedDatasource
protected boolean isLoadedDatasource(String datasource) throws Exception(Code)
Load a datasource in jonas server
Parameters:
  datasource - name of the datasource boolean true if the datasource is loaded, false else
throws:
  Exception - if an error occurs



isRarLoaded
public boolean isRarLoaded(String filename) throws Exception(Code)
Rar is loaded in the jonas server
Parameters:
  filename - rar file, without ".rar" extension true if the rar is loaded, else false
throws:
  Exception - if an error occurs



setUp
protected void setUp() throws Exception(Code)
Common setUp routine, used for every test.
throws:
  Exception - if an error occurs



tearDown
public void tearDown() throws Exception(Code)
Tear Down cleanUp action
throws:
  Exception -



testTabs
protected void testTabs(WebTable tabTable, int nbTabs, int selectedTab, String msg)(Code)
Verify number of tabs and the selected tab
Parameters:
  tabTable - the tab table
Parameters:
  nbTabs - number of tabs
Parameters:
  selectedTab - the numero of the selected tab



unBindMailFactory
protected void unBindMailFactory(String mailFactory) throws Exception(Code)
Unbind a mail factory in jonas server
Parameters:
  mailFactory - name of the mail factory
throws:
  Exception - if an error occurs



unUseBeans
public void unUseBeans(String filename) throws Exception(Code)
Unload a bean jar file in the jonas server
Parameters:
  filename - jar file, without ".jar" extension
throws:
  Exception - if an error occurs



unUseDatasource
protected void unUseDatasource(String datasource) throws Exception(Code)
Unload a datasource in jonas server
Parameters:
  datasource - name of the datasource
throws:
  Exception - if an error occurs



unUseEar
public void unUseEar(String filename) throws Exception(Code)
Unload a ear file in the jonas server
Parameters:
  filename - ear file, without ".ear" extension
throws:
  Exception - if an error occurs



undeployAll
protected void undeployAll(WebResponse wr) throws Exception(Code)
Undeploy all
throws:
  Exception - if error occurs



undeployAllEar
protected void undeployAllEar() throws Exception(Code)
Undeploy all EAR
throws:
  Exception - if error occurs



undeployAllJar
protected void undeployAllJar() throws Exception(Code)
Undeploy all Jars
throws:
  Exception - if error occurs



undeployEar
protected void undeployEar(String name) throws Exception(Code)
Undeploy an EAR
Parameters:
  name - String of EAR Name
throws:
  Exception - if error occurs



useBeans
public void useBeans(String filename) throws Exception(Code)
Load a bean jar file in the jonas server
Parameters:
  filename - jar file, without ".jar" extension
throws:
  Exception - if an error occurs



useDatasource
protected void useDatasource(String datasource, Properties properties) throws Exception(Code)
Load a datasource in jonas server
Parameters:
  datasource - name of the datasource
Parameters:
  properties - properties of the datasource
throws:
  Exception - if an error occurs



useEar
public void useEar(String filename) throws Exception(Code)
Load an ear file in the jonas server
Parameters:
  filename - ear file, without ".ear" extension
throws:
  Exception - if an error occurs



useRar
public void useRar(String filename) throws Exception(Code)
Load a rar file in the jonas server
Parameters:
  filename - rar file, without ".rar" extension
throws:
  Exception - if an error occurs



useWar
public void useWar(String filename) throws Exception(Code)
Load a war file in the jonas server
Parameters:
  filename - war file, without ".war" extension
throws:
  Exception - if an error occurs



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