|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport org.ow2.jonas.lib.reconfig.ReconfigEmitter org.ow2.jonas.lib.service.AbsServiceImpl org.ow2.jonas.resource.internal.JOnASResourceService
public class JOnASResourceService
JCA resource service implementation.
Field Summary | |
---|---|
static String |
JONAS_BASE
The name of the JONAS_BASE directory. |
static String |
WORK_RARS_DIR
The name of the working apps directory. |
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
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 |
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, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
Methods inherited from class org.ow2.jonas.lib.reconfig.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, wait, wait, wait |
Methods inherited from interface org.ow2.jonas.service.Service |
---|
getName, init, isStarted, setName, start, stop |
Field Detail |
---|
public static final String JONAS_BASE
public static final String WORK_RARS_DIR
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 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 ResourceServiceException, NamingException, MalformedURLException
createResourceAdapter
in interface ResourceService
ctx
- Context to use for deploying an RAR
MalformedURLException
ResourceServiceException
NamingException
public 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()
public Integer getCurrentNumberOfRars()
getCurrentNumberOfRars
in interface JOnASResourceServiceMBean
public List<String> getDeployedRars()
getDeployedRars
in interface JOnASResourceServiceMBean
public String deployRar(String fileName) throws ResourceServiceException
deployRar
in interface ResourceService
fileName
- the name of the rar file.
Exception
- if unable to deploy the rar
ResourceServiceException
public 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 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 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 ResourceService
jndiName
- 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |