|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
org.objectweb.jonas.service.AbsServiceImpl
org.objectweb.jonas.resource.ResourceServiceImpl
public class ResourceServiceImpl
JCA resource service implmentation
Field Summary | |
---|---|
static String |
AUTOLOADDIR
Autoload directory property name |
static String |
CLASS
Service class property name |
static String |
JONAS_BASE
The name of the JONAS_BASE directory |
static String |
PARSINGWITHVALIDATION
Parsing validation property name |
static String |
RARSDIR
The name of the rars directory |
static String |
RESOURCE_LIST
Resources list property name |
static String |
WORK_RARS_DIR
The name of the working apps directory. |
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
ResourceServiceImpl()
Default construtor for ResourceService |
Method Summary | |
---|---|
String |
createResourceAdapter(Context ctx)
Create a new resource adapter. |
String |
deployRar(String fileName)
Deploy the resource adapter |
String |
deployRarMBean(String fileName)
Deploy an RAR by delegating the operation to the createResourceAdapter method. |
void |
deployRars(Context ctx)
Deploy the given rars of an ear file with the specified parent classloader (ear classloader). |
void |
doInit(Context ctx)
- Get the loggers - Get the global jndi context - Get the list of the resource adapters. |
void |
doStart()
Start the Resource service. |
void |
doStop()
Stop the Resource service. |
List |
getAutoloadDirectories()
Return the list of "autoload" directories for RAR containers. |
Integer |
getCurrentNumberOfRars()
|
Integer |
getCurrentNumberOfResource()
|
List |
getDeployableRars()
Return the list of installed RAR container ready to deploy. |
List |
getDeployedRars()
|
List |
getInstalledRars()
Return the list of installed RAR containers. |
String |
getJDBCResourceAdapater(String jndiName)
Return the JDBC ResourceAdapter MBean OBJECT_NAME deployed in the current server haveing the 'jndiName' attribue value equal to the given jndiName |
ObjectName[] |
getJDBCResourceAdapaters()
Return the JDBC ResourceAdapter MBean ObjectNames deployed in the current server. |
Set |
getRarNames()
This method is added temporarily. |
String |
getRarsDirectory()
Return the Rars directory. |
Boolean |
isRarDeployed(String fileName)
Test if the specified filename is already deployed or not. |
boolean |
isRarDeployedByUnpackName(String unpackName)
Test if the specified unpack name is already deployed or not. |
boolean |
isRarLoaded(String fileName)
Test if the specified filename is already deployed or not |
void |
unDeployRar(String fileName)
Undeploy the resource adapter |
void |
unDeployRarMBean(String fileName)
Undeploy an RAR by delegating the operation to the unRegisterRar() method. |
void |
unDeployRars(URL[] urls,
URL earUrl)
Undeploy the given rars of an ear file. |
void |
unRegisterRar(Context ctx)
Unregister the resource adapter. |
Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl |
---|
getDomainName, getJonasServerName, getName, init, isStarted, setName, start, stop |
Methods inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter |
---|
initLogger, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jonas.service.Service |
---|
getName, init, isStarted, setName, start, stop |
Field Detail |
---|
public static final String AUTOLOADDIR
public static final String CLASS
public static final String PARSINGWITHVALIDATION
public static final String RESOURCE_LIST
public static final String JONAS_BASE
public static final String WORK_RARS_DIR
public static final String RARSDIR
Constructor Detail |
---|
public ResourceServiceImpl()
Method Detail |
---|
public void doInit(Context ctx)
doInit
in class AbsServiceImpl
ctx
- Contextpublic void doStart() throws ServiceException
doStart
in class AbsServiceImpl
ServiceException
- if the startup failed.public void doStop() throws ServiceException
doStop
in class AbsServiceImpl
ServiceException
- if the stop failed.public String createResourceAdapter(Context ctx) throws Exception
createResourceAdapter
in interface ResourceService
ctx
- Context to use for deploying an RAR
Exception
- error encounteredpublic void deployRars(Context ctx) throws ResourceServiceException
deployRars
in interface ResourceService
ctx
- the context containing the configuration
to deploy the rars.ResourceServiceException
- if an error occurs during
the deployment.public void unDeployRars(URL[] urls, URL earUrl)
unDeployRars
in interface ResourceService
urls
- the list of the urls of the rars to undeploy.earUrl
- the URL of the associated EAR filepublic void unRegisterRar(Context ctx) throws Exception
ctx
- Context to use for unregistering an RAR
Exception
- error encounteredpublic ObjectName[] getJDBCResourceAdapaters() throws Exception
Exception
- The ResourceAdapter MBeans checking failed.public String getJDBCResourceAdapater(String jndiName) throws Exception
jndiName
- A DataSource jndi name we are looking for.
Exception
- The ResourceAdapter MBeans checking failed.public Integer getCurrentNumberOfResource()
getCurrentNumberOfResource
in interface ResourceServiceImplMBean
public Integer getCurrentNumberOfRars()
getCurrentNumberOfRars
in interface ResourceServiceImplMBean
public List getDeployedRars()
getDeployedRars
in interface ResourceServiceImplMBean
public List getInstalledRars() throws Exception
getInstalledRars
in interface ResourceServiceImplMBean
Exception
- if the list can't be retrievedpublic Set getRarNames()
getRarNames
in interface ResourceServiceImplMBean
public String deployRarMBean(String fileName) throws RemoteException, ResourceServiceException
deployRarMBean
in interface ResourceServiceImplMBean
fileName
- the fileName of the rar which must be be deployed.
RemoteException
- if rmi call failed.
ResourceServiceException
- if the deployment of the RAR failed.public String deployRar(String fileName) throws Exception
deployRar
in interface ResourceService
fileName
- the name of the rar file.
Exception
- if unable to deploy the rarpublic Boolean isRarDeployed(String fileName)
isRarDeployed
in interface ResourceService
fileName
- the name of the rar file.
public boolean isRarDeployedByUnpackName(String unpackName)
isRarDeployedByUnpackName
in interface ResourceService
unpackName
- the name of the rar file.
public void unDeployRarMBean(String fileName) throws RemoteException, ResourceServiceException
unDeployRarMBean
in interface ResourceServiceImplMBean
fileName
- the fileName of the rar which must be be undeployed.
RemoteException
- if rmi call failed.
ResourceServiceException
- if the undeployment of the RAR failed.public void unDeployRar(String fileName) throws Exception
unDeployRar
in interface ResourceService
fileName
- the name of the rar file.
Exception
- if not able to undeploy the rarpublic boolean isRarLoaded(String fileName)
isRarLoaded
in interface ResourceService
fileName
- the name of the rar file.
public List getDeployableRars() throws Exception
getDeployableRars
in interface ResourceServiceImplMBean
Exception
- if error retrieving the listpublic List getAutoloadDirectories()
getAutoloadDirectories
in interface ResourceServiceImplMBean
public String getRarsDirectory()
getRarsDirectory
in interface ResourceServiceImplMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |