|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.management.javaee.ManagedObject
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.resource.internal.JOnASResourceService
public class JOnASResourceService
JCA resource service implementation.
| Constructor Summary | |
|---|---|
JOnASResourceService()
Default constructor for ResourceService. |
|
| Method Summary | |
|---|---|
String |
createResourceAdapter(Context ctx)
Create a new resource adapter. |
String |
deployRar(String fileName)
Deploy the resource adapter |
void |
deployRars(Context ctx)
Deploy the given rars of an ear file with the specified parent classloader (ear classloader). |
void |
doStart()
Start the Resource service. |
void |
doStop()
Stop the Resource service. |
Object |
getConfigObject(String jndiName)
get the ConfigObj object matching the jndiName. |
ConnectorDesc |
getConnectorDesc(String jndiName)
get the RAR ConnectorDesc object matching the JNDI name. |
Integer |
getCurrentNumberOfRars()
|
Integer |
getCurrentNumberOfResource()
|
List<String> |
getDeployedRars()
|
String |
getJDBCResourceAdapater(String jndiName)
Return the JDBC ResourceAdapter MBean OBJECT_NAME deployed in the current server having the 'jndiName' attribute value equal to the given jndiName. |
ObjectName[] |
getJDBCResourceAdapaters()
Return the JDBC ResourceAdapter MBean ObjectNames deployed in the current server. |
JonasConnectorDesc |
getJonasConnectorDesc(String jndiName)
get the RAR JonasConnectorDesc object matching the JNDI name. |
Rar |
getRar(String jndiName)
get the Rar matching the jndiNname will be used in EJB container to deploy an MDB |
protected String |
getRarsWorkDirectory()
|
static Object |
getResourceObject(String jndiName)
get the ResourceAdapter matching the jndiName will be used in ResourceObjectJNDIHandler class at lookup time. |
String |
getXmlContent(String jndiName)
get the ResourceAdapter Connector object matching the jndiName. |
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 |
setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
|
void |
setDeploymentPlanDeployer(DeploymentPlanDeployer deploymentPlanDeployer)
Sets the JOnAS deployment plan deployer service. |
void |
setJmxService(JmxService jmxService)
|
void |
setParsingwithvalidation(boolean validate)
|
void |
setRegistryService(RegistryService registry)
|
void |
setTransactionService(TransactionService transactionService)
|
void |
setWorkManagerService(WorkManagerService workManagerService)
|
void |
unDeployRar(String filename)
Undeploy the resource adapter. |
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.ow2.jonas.lib.service.AbsServiceImpl |
|---|
convertToList, doInit, getDomainName, getJonasServerName, getName, getSequenceNumber, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
| Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject |
|---|
getModelMBean, sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ow2.jonas.service.Service |
|---|
getName, init, isStarted, setName, start, stop |
| Constructor Detail |
|---|
public JOnASResourceService()
| Method Detail |
|---|
public void setParsingwithvalidation(boolean validate)
validate - Use a validating XML parser ?
public void doStart()
throws ServiceException
doStart in class AbsServiceImplServiceException - if the startup failed.
public void doStop()
throws ServiceException
doStop in class AbsServiceImplServiceException - if the stop failed.
public String createResourceAdapter(Context ctx)
throws ResourceServiceException,
NamingException,
MalformedURLException
createResourceAdapter in interface ResourceServicectx - Context to use for deploying an RAR
MalformedURLException
ResourceServiceException
NamingException
public void deployRars(Context ctx)
throws ResourceServiceException
deployRars in interface ResourceServicectx - 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 ResourceServiceurls - the list of the urls of the rars to undeploy.earUrl - the URL of the associated EAR file
public void unRegisterRar(Context ctx)
throws Exception
ctx - Context to use for unregistering an RAR
Exception - error encountered
public 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()
public Integer getCurrentNumberOfRars()
getCurrentNumberOfRars in interface JOnASResourceServiceMBeanpublic List<String> getDeployedRars()
getDeployedRars in interface JOnASResourceServiceMBean
public String deployRar(String fileName)
throws ResourceServiceException
deployRar in interface ResourceServicefileName - the name of the rar file.
Exception - if unable to deploy the rar
ResourceServiceExceptionpublic Boolean isRarDeployed(String fileName)
isRarDeployed in interface ResourceServicefileName - the name of the rar file.
public boolean isRarDeployedByUnpackName(String unpackName)
isRarDeployedByUnpackName in interface ResourceServiceunpackName - the name of the RAR file.
public void unDeployRar(String filename)
throws Exception
unDeployRar in interface ResourceServicefileName - the name of the rar file.
Exception - if not able to undeploy the rarpublic boolean isRarLoaded(String fileName)
isRarLoaded in interface ResourceServicefileName - the name of the rar file.
public void setTransactionService(TransactionService transactionService)
transactionService - the transactionService to setpublic void setJmxService(JmxService jmxService)
jmxService - the jmxService to setpublic void setWorkManagerService(WorkManagerService workManagerService)
workManagerService - the workManagerService to setpublic void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManager - the deployerManager to setpublic void setDeploymentPlanDeployer(DeploymentPlanDeployer deploymentPlanDeployer)
deploymentPlanDeployer - the JOnAS deployment plan deployer service.public void setRegistryService(RegistryService registry)
registry - the registry service to setpublic Rar getRar(String jndiName)
getRar in interface ResourceServicejndiName - jndi name to lookup
public ConnectorDesc getConnectorDesc(String jndiName)
jndiName - the JNDI name to lookup
public JonasConnectorDesc getJonasConnectorDesc(String jndiName)
jndiName - the JNDI name to lookup
public static Object getResourceObject(String jndiName)
jndiName - to lookup ResourceObject
public String getXmlContent(String jndiName)
jndiName - String of jNDI name
public Object getConfigObject(String jndiName)
jndiName - String of JNDI name
protected String getRarsWorkDirectory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||