|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.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. |
org.ow2.jonas.deployment.rar.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. |
org.ow2.jonas.deployment.rar.JonasConnectorDesc |
getJonasConnectorDesc(String jndiName)
get the RAR JonasConnectorDesc object matching the JNDI name. |
org.ow2.jonas.resource.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 |
setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
|
void |
setParsingwithvalidation(boolean validate)
|
void |
setRegistryService(org.ow2.jonas.registry.RegistryService registry)
|
void |
setTransactionService(org.ow2.jonas.tm.TransactionService transactionService)
|
void |
setWorkManagerService(org.ow2.jonas.workmanager.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 org.ow2.jonas.service.ServiceException
doStart in class org.ow2.jonas.lib.service.AbsServiceImplorg.ow2.jonas.service.ServiceException - if the startup failed.
public void doStop()
throws org.ow2.jonas.service.ServiceException
doStop in class org.ow2.jonas.lib.service.AbsServiceImplorg.ow2.jonas.service.ServiceException - if the stop failed.
public String createResourceAdapter(Context ctx)
throws org.ow2.jonas.resource.ResourceServiceException,
NamingException,
MalformedURLException
createResourceAdapter in interface org.ow2.jonas.resource.ResourceServicectx - Context to use for deploying an RAR
MalformedURLException
org.ow2.jonas.resource.ResourceServiceException
NamingException
public void deployRars(Context ctx)
throws org.ow2.jonas.resource.ResourceServiceException
deployRars in interface org.ow2.jonas.resource.ResourceServicectx - the context containing the configuration to deploy the rars.org.ow2.jonas.resource.ResourceServiceException - if an error occurs during the deployment.
public void unDeployRars(URL[] urls,
URL earUrl)
unDeployRars in interface org.ow2.jonas.resource.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 org.ow2.jonas.resource.ResourceServiceException
deployRar in interface org.ow2.jonas.resource.ResourceServicefileName - the name of the rar file.
Exception - if unable to deploy the rar
org.ow2.jonas.resource.ResourceServiceExceptionpublic Boolean isRarDeployed(String fileName)
isRarDeployed in interface org.ow2.jonas.resource.ResourceServicefileName - the name of the rar file.
public boolean isRarDeployedByUnpackName(String unpackName)
isRarDeployedByUnpackName in interface org.ow2.jonas.resource.ResourceServiceunpackName - the name of the RAR file.
public void unDeployRar(String filename)
throws Exception
unDeployRar in interface org.ow2.jonas.resource.ResourceServicefileName - the name of the rar file.
Exception - if not able to undeploy the rarpublic boolean isRarLoaded(String fileName)
isRarLoaded in interface org.ow2.jonas.resource.ResourceServicefileName - the name of the rar file.
public void setTransactionService(org.ow2.jonas.tm.TransactionService transactionService)
transactionService - the transactionService to setpublic void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
jmxService - the jmxService to setpublic void setWorkManagerService(org.ow2.jonas.workmanager.WorkManagerService workManagerService)
workManagerService - the workManagerService to setpublic void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManagerService - the deployerManagerService to setpublic void setRegistryService(org.ow2.jonas.registry.RegistryService registry)
registry - the registry service to setpublic org.ow2.jonas.resource.Rar getRar(String jndiName)
getRar in interface org.ow2.jonas.resource.ResourceServicejndiName - jndi name to lookup
public org.ow2.jonas.deployment.rar.ConnectorDesc getConnectorDesc(String jndiName)
jndiName - the JNDI name to lookup
public org.ow2.jonas.deployment.rar.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 | |||||||||