|
||||||||||
| 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 |
RARSDIR
The name of the RARs 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 | |
|---|---|
void |
checkRequirements()
Deprecated. |
String |
createResourceAdapter(Context ctx)
Create a new resource adapter. |
String |
deployRar(String fileName)
Deploy the resource adapter |
String |
deployRarMBean(String fileName)
For JMX. |
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. |
List |
getAutoloadDirectories()
Return the list of "autoload" directories for RAR containers. |
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 |
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 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 |
Set |
getRarNames()
This method is added temporarily. |
String |
getRarsDirectory()
Return the Rars directory. |
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 |
setAutoloaddir(String directories)
|
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 |
setResources(String resources)
|
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 |
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.ow2.jonas.lib.service.AbsServiceImpl |
|---|
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isOSGi, 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
public static final String RARSDIR
| Constructor Detail |
|---|
public JOnASResourceService()
| Method Detail |
|---|
public void checkRequirements()
throws org.ow2.jonas.service.ServiceException
checkRequirements in interface org.ow2.jonas.service.ServicecheckRequirements in class org.ow2.jonas.lib.service.AbsServiceImplorg.ow2.jonas.service.ServiceException - A service reference is not set.AbsServiceImpl.checkRequirements()public void setAutoloaddir(String directories)
directories - Auto loaded directories.public void setResources(String resources)
resources - initial set of resources to be deployed.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()
getCurrentNumberOfResource in interface JOnASResourceServiceMBeanpublic Integer getCurrentNumberOfRars()
getCurrentNumberOfRars in interface JOnASResourceServiceMBeanpublic List getDeployedRars()
getDeployedRars in interface JOnASResourceServiceMBean
public List getInstalledRars()
throws Exception
getInstalledRars in interface JOnASResourceServiceMBeanException - if the list can't be retrievedpublic Set getRarNames()
getRarNames in interface JOnASResourceServiceMBean
public String deployRarMBean(String fileName)
throws RemoteException,
org.ow2.jonas.resource.ResourceServiceException
deployRarMBean in interface JOnASResourceServiceMBeanfileName - the fileName of the rar which must be be deployed.
RemoteException - if rmi call failed.
org.ow2.jonas.resource.ResourceServiceException - if the deployment of the RAR failed.
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 unDeployRarMBean(String filename)
throws RemoteException,
org.ow2.jonas.resource.ResourceServiceException
unDeployRarMBean in interface JOnASResourceServiceMBeanfilename - the fileName of the rar which must be be undeployed.
RemoteException - if rmi call failed.
org.ow2.jonas.resource.ResourceServiceException - if the undeployment of the RAR failed.
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 List getDeployableRars()
throws Exception
getDeployableRars in interface JOnASResourceServiceMBeanException - if error retrieving the listpublic List getAutoloadDirectories()
getAutoloadDirectories in interface JOnASResourceServiceMBeanpublic String getRarsDirectory()
getRarsDirectory in interface JOnASResourceServiceMBeanpublic 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 | |||||||||