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


org.objectweb.jonas.service.AbsServiceImpl
   org.objectweb.jonas.resource.ResourceServiceImpl

ResourceServiceImpl
public class ResourceServiceImpl extends AbsServiceImpl implements ResourceService,ResourceServiceImplMBean(Code)
JCA resource service implmentation
author:
   Philippe Coq
author:
   Contributor(s):
author:
   JOnAS 2.4 Sebastien Chassande-Barrioz (sebastien.chassande@inrialpes.fr)
author:
   JOnAS 3.0 Eric Hardesty (Eric.Hardesty@bull.com)
author:
   JOnAS 4.0 Adriana Danes (JSR 77 + use of Jakarta Modeler Component : http://jakarta.apache.org/commons/modeler)
author:
   Eric Hardesty (J2CA 1.5)


Field Summary
final public static  StringAUTOLOADDIR
    
final public static  StringCLASS
    
final public static  intDEF_EXEC_TIME
    
final public static  intDEF_MAX_WRK_THREADS
    
final public static  intDEF_WRK_THREADS
    
final public static  intDEF_WRK_THREADWAITTIMEOUT
    
final public static  StringEXECTIMEOUT
    
final public static  StringFACTORY_OFFSET
    
final public static  StringFACTORY_TYPE
    
final public static  StringJNDI_NAME
    
final public static  StringJONAS_BASE
    
final public static  StringJONAS_RA_XML
    
final public static  StringLNK_JNDI_NAME
    
final public static  StringLNK_RAR_FILENAME
    
final public static  StringMAXWORKTHREADS
    
final public static  StringMINWORKTHREADS
    
final public static  StringPARSINGWITHVALIDATION
    
final public static  StringRARSDIR
    
final public static  StringRAR_FILENAME
    
final public static  StringRAR_OBJNAME
    
final public static  StringRA_XML
    
final public static  StringRESOURCE_LIST
    
final public static  StringTHREADWAITTIMEOUT
    
final public static  StringWORK_RARS_DIR
     The name of the working apps directory.

Constructor Summary
public  ResourceServiceImpl()
    

Method Summary
public  StringcreateResourceAdapter(Context ctx)
     Create a new resource adapter.
public  StringdeployRar(String fileName)
    
public  StringdeployRarMBean(String fileName)
     Deploy an RAR by delegating the operation to the createResourceAdapter method. This is used for JMX management.
Parameters:
  fileName - the fileName of the rar which must be be deployed.
public  voiddeployRars(Context ctx)
     Deploy the given rars of an ear file with the specified parent classloader (ear classloader).
public  voiddoInit(Context ctx)
     - Get the loggers - Get the global jndi context - Get the list of the resource adapters.
public  voiddoStart()
     Start the Resource service.
public  voiddoStop()
     Stop the Resource service.
public  ListgetAutoloadDirectories()
     Return the list of "autoload" directories for RAR containers.
public  IntegergetCurrentNumberOfRars()
    
public  IntegergetCurrentNumberOfResource()
    
public  ListgetDeployableRars()
     Return the list of installed RAR container ready to deploy.
public  ListgetDeployedRars()
    
public  ListgetInstalledRars()
     Return the list of installed RAR containers.
public  StringgetJDBCResourceAdapater(String jndiName)
     Return the JDBC ResourceAdapter MBean OBJECT_NAME deployed in the current server haveing the 'jndiName' attribue value equal to the given jndiName
Parameters:
  jndiName - A DataSource jndi name we are looking for.
public  ObjectName[]getJDBCResourceAdapaters()
     Return the JDBC ResourceAdapter MBean ObjectNames deployed in the current server.
public  SetgetRarNames()
     This method is added temporarily.
public  StringgetRarsDirectory()
     Return the Rars directory.
public  BooleanisRarDeployed(String fileName)
     Test if the specified filename is already deployed or not.
Parameters:
  fileName - the name of the rar file.
public  booleanisRarDeployedByUnpackName(String unpackName)
     Test if the specified unpack name is already deployed or not.
public  booleanisRarLoaded(String fileName)
     Test if the specified filename is already deployed or not
Parameters:
  fileName - the name of the rar file.
public  voidunDeployRar(String fileName)
    
public  voidunDeployRarMBean(String fileName)
     Undeploy an RAR by delegating the operation to the unRegisterRar() method.
public  voidunDeployRars(URL[] urls, URL earUrl)
     Undeploy the given rars of an ear file.
public  voidunRegisterRar(Context ctx)
     Unregister the resource adapter.

Field Detail
AUTOLOADDIR
final public static String AUTOLOADDIR(Code)
Autoload directory property name



CLASS
final public static String CLASS(Code)
Service class property name



DEF_EXEC_TIME
final public static int DEF_EXEC_TIME(Code)
Maximum work execution timeout (0 is unlimited)



DEF_MAX_WRK_THREADS
final public static int DEF_MAX_WRK_THREADS(Code)
Default max number of work threads



DEF_WRK_THREADS
final public static int DEF_WRK_THREADS(Code)
Default number of work threads



DEF_WRK_THREADWAITTIMEOUT
final public static int DEF_WRK_THREADWAITTIMEOUT(Code)
Default work thread timeout



EXECTIMEOUT
final public static String EXECTIMEOUT(Code)
Work max execution timeout property name



FACTORY_OFFSET
final public static String FACTORY_OFFSET(Code)
Factory offset property name



FACTORY_TYPE
final public static String FACTORY_TYPE(Code)
Factory type property name



JNDI_NAME
final public static String JNDI_NAME(Code)
Jndiname property name



JONAS_BASE
final public static String JONAS_BASE(Code)
The name of the JONAS_BASE directory



JONAS_RA_XML
final public static String JONAS_RA_XML(Code)
Jonas ra.xml property name



LNK_JNDI_NAME
final public static String LNK_JNDI_NAME(Code)
Jndiname link property name



LNK_RAR_FILENAME
final public static String LNK_RAR_FILENAME(Code)
Link Rar filename property name



MAXWORKTHREADS
final public static String MAXWORKTHREADS(Code)
Maximum number of work threads property name



MINWORKTHREADS
final public static String MINWORKTHREADS(Code)
Minimum number of work threads property name



PARSINGWITHVALIDATION
final public static String PARSINGWITHVALIDATION(Code)
Parsing validation property name



RARSDIR
final public static String RARSDIR(Code)
The name of the rars directory



RAR_FILENAME
final public static String RAR_FILENAME(Code)
Rar filename property name



RAR_OBJNAME
final public static String RAR_OBJNAME(Code)
Rar object property name



RA_XML
final public static String RA_XML(Code)
ra.xml property name



RESOURCE_LIST
final public static String RESOURCE_LIST(Code)
Resources list property name



THREADWAITTIMEOUT
final public static String THREADWAITTIMEOUT(Code)
Thread timeout



WORK_RARS_DIR
final public static String WORK_RARS_DIR(Code)
The name of the working apps directory.




Constructor Detail
ResourceServiceImpl
public ResourceServiceImpl()(Code)
Default construtor for ResourceService




Method Detail
createResourceAdapter
public String createResourceAdapter(Context ctx) throws Exception(Code)
Create a new resource adapter. This Resource Adapter is configured via xml files in the rar file
Parameters:
  ctx - Context to use for deploying an RAR Sting resource objectName
throws:
  Exception - error encountered



deployRar
public String deployRar(String fileName) throws Exception(Code)
Deploy the resource adapter
Parameters:
  fileName - the name of the rar file.
throws:
  Exception - if unable to deploy the rar String ObjectName of the deployed rar



deployRarMBean
public String deployRarMBean(String fileName) throws RemoteException, ResourceServiceException(Code)
Deploy an RAR by delegating the operation to the createResourceAdapter method. This is used for JMX management.
Parameters:
  fileName - the fileName of the rar which must be be deployed. The ObjectName of the MBean associated to the deployed J2EE Application
throws:
  RemoteException - if rmi call failed.
throws:
  ResourceServiceException - if the deployment of the RAR failed.



deployRars
public void deployRars(Context ctx) throws ResourceServiceException(Code)
Deploy the given rars of an ear file with the specified parent classloader (ear classloader). (This method is only used for for ear applications).
Parameters:
  ctx - the context containing the configurationto deploy the rars.
This context contains the following parameters :
- urls the list of the urls of the rars to deploy.
- earRootURL the URL of the ear application file.
- earClassLoader the ear classLoader of the j2ee app.
- altDDs the optional URI of deployment descriptor.

throws:
  ResourceServiceException - if an error occurs duringthe deployment.



doInit
public void doInit(Context ctx)(Code)
- Get the loggers - Get the global jndi context - Get the list of the resource adapters. The list is reachable in the - context parameter under the name RESOURCE_LIST. - Get the transaction manager into the jndi - Set the XML validation property
Parameters:
  ctx - Context



doStart
public void doStart() throws ServiceException(Code)
Start the Resource service.
throws:
  ServiceException - if the startup failed.



doStop
public void doStop() throws ServiceException(Code)
Stop the Resource service.
throws:
  ServiceException - if the stop failed.



getAutoloadDirectories
public List getAutoloadDirectories()(Code)
Return the list of "autoload" directories for RAR containers. The list of all "autoload" directories



getCurrentNumberOfRars
public Integer getCurrentNumberOfRars()(Code)
Integer Total Number of Rars available in JOnAS



getCurrentNumberOfResource
public Integer getCurrentNumberOfResource()(Code)
Integer Total Number of Resources available in JOnAS



getDeployableRars
public List getDeployableRars() throws Exception(Code)
Return the list of installed RAR container ready to deploy. The list of deployable RAR container
throws:
  Exception - if error retrieving the list



getDeployedRars
public List getDeployedRars()(Code)
the list of RAR files deployed



getInstalledRars
public List getInstalledRars() throws Exception(Code)
Return the list of installed RAR containers. The RAR files or the directories with expanded RAR container are searched in JONAS_BASE/rars and all rar directories 'autoload'. The list of RAR files or the directories with expanded RAR container found
throws:
  Exception - if the list can't be retrieved



getJDBCResourceAdapater
public String getJDBCResourceAdapater(String jndiName) throws Exception(Code)
Return the JDBC ResourceAdapter MBean OBJECT_NAME deployed in the current server haveing the 'jndiName' attribue value equal to the given jndiName
Parameters:
  jndiName - A DataSource jndi name we are looking for. The found MBean OBJECT_NAME or null if none of the JDBC ResourceAdapter MBeanhave the given jndi name.
throws:
  Exception - The ResourceAdapter MBeans checking failed.



getJDBCResourceAdapaters
public ObjectName[] getJDBCResourceAdapaters() throws Exception(Code)
Return the JDBC ResourceAdapter MBean ObjectNames deployed in the current server. The JDBC ResourceAdapters have a 'properties' attribue containing the following properties set (not null and not empty): 'dsClass', 'URL'. The found MBean ObjectNames or null if no JDBC ResourceAdapter MBean registered forthe current server in the current domain.
throws:
  Exception - The ResourceAdapter MBeans checking failed.



getRarNames
public Set getRarNames()(Code)
This method is added temporarily. It will disapear when Rars will have their associated MBeans (when Rars will become manageable) the names of the rars currently deployed in the JOnAS server



getRarsDirectory
public String getRarsDirectory()(Code)
Return the Rars directory. The Rars directory



isRarDeployed
public Boolean isRarDeployed(String fileName)(Code)
Test if the specified filename is already deployed or not.
Parameters:
  fileName - the name of the rar file. true if the rar is deployed, else false.



isRarDeployedByUnpackName
public boolean isRarDeployedByUnpackName(String unpackName)(Code)
Test if the specified unpack name is already deployed or not. This method is defined in the ResourceService interface.
Parameters:
  unpackName - the name of the rar file. true if the rar is deployed, else false.



isRarLoaded
public boolean isRarLoaded(String fileName)(Code)
Test if the specified filename is already deployed or not
Parameters:
  fileName - the name of the rar file. true if the rar is deployed, else false.



unDeployRar
public void unDeployRar(String fileName) throws Exception(Code)
Undeploy the resource adapter
Parameters:
  fileName - the name of the rar file.
throws:
  Exception - if not able to undeploy the rar



unDeployRarMBean
public void unDeployRarMBean(String fileName) throws RemoteException, ResourceServiceException(Code)
Undeploy an RAR by delegating the operation to the unRegisterRar() method. This is used for JMX management.
Parameters:
  fileName - the fileName of the rar which must be be undeployed.
throws:
  RemoteException - if rmi call failed.
throws:
  ResourceServiceException - if the undeployment of the RAR failed.



unDeployRars
public void unDeployRars(URL[] urls, URL earUrl)(Code)
Undeploy the given rars of an ear file. (This method is only used for the ear applications).
Parameters:
  urls - the list of the urls of the rars to undeploy.
Parameters:
  earUrl - the URL of the associated EAR file



unRegisterRar
public void unRegisterRar(Context ctx) throws Exception(Code)
Unregister the resource adapter.
Parameters:
  ctx - Context to use for unregistering an RAR
throws:
  Exception - error encountered



Methods inherited from org.objectweb.jonas.service.AbsServiceImpl
abstract protected void doInit(Context ctx) throws ServiceException(Code)(Java Doc)
abstract protected void doStart() throws ServiceException(Code)(Java Doc)
abstract protected void doStop() throws ServiceException(Code)(Java Doc)
public String getDomainName()(Code)(Java Doc)
public String getJonasServerName()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public void init(Context ctx) throws ServiceException(Code)(Java Doc)
public boolean isStarted()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void start() throws ServiceException(Code)(Java Doc)
public void stop() throws ServiceException(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.