org.jboss.jdo.castor
Class CastorJDOImpl

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.jdo.castor.CastorJDOImpl
All Implemented Interfaces:
Serializable, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, Referenceable, ObjectFactory, CastorJDOImplMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean

public class CastorJDOImpl
extends ServiceMBeanSupport
implements ObjectFactory, Referenceable, Serializable, CastorJDOImplMBean, MBeanRegistration

Castor JDO support.

Version:
$Revision: 81038 $
Author:
Oleg Nitz (on@ibis.odessa.ua)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.jdo.castor.CastorJDOImplMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
CastorJDOImpl()
           
 
Method Summary
 void creating(Class objClass, Object identity)
           
 void creating(Object objClass, Object identity)
           
 void exception(Exception except)
           
 URL findResourceInJar(String name)
          Copied from Jetty.java.
 boolean getCommonClassPath()
           
 String getConfiguration()
           
 String getConfigurationURL()
           
 Database getDatabase()
           
 String getDescription()
           
 String getJndiName()
           
 int getLockTimeout()
           
 boolean getLoggingEnabled()
           
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment)
           
protected  ObjectName getObjectName(MBeanServer server, ObjectName name)
           
 PrintWriter getPrintWriter()
           
 Reference getReference()
           
 boolean isAutoStore()
           
 boolean isDatabasePooling()
          Return true if the Database instance uses the application server pooling.
 void loading(Class objClass, Object identity)
           
 void loading(Object objClass, Object identity)
           
 void message(String message)
           
 void queryStatement(String statement)
           
 void removing(Class objClass, Object identity)
           
 void removing(Object objClass, Object identity)
           
 void setAutoStore(boolean autoStore)
           
 void setCommonClassPath(boolean commonClassPath)
           
 void setConfiguration(String dbConf)
           
 void setDatabasePooling(boolean dbPooling)
          True if user prefers to use application server database pools.
 void setDescription(String description)
           
 void setJndiName(String jndiName)
           
 void setLockTimeout(int lockTimeout)
           
 void setLoggingEnabled(boolean loggingEnabled)
           
protected  void startService()
           
protected  void stopService()
           
 void storeStatement(String statement)
           
 void storing(Class objClass, Object identity)
           
 void storing(Object objClass, Object identity)
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 

Constructor Detail

CastorJDOImpl

public CastorJDOImpl()
Method Detail

getObjectName

protected ObjectName getObjectName(MBeanServer server,
                                   ObjectName name)
                            throws MalformedObjectNameException
Overrides:
getObjectName in class ServiceMBeanSupport
Throws:
MalformedObjectNameException

startService

protected void startService()
                     throws Exception
Overrides:
startService in class ServiceMBeanSupport
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Overrides:
stopService in class ServiceMBeanSupport
Throws:
Exception

findResourceInJar

public URL findResourceInJar(String name)
Copied from Jetty.java. Used to find resource within .sar.


setJndiName

public void setJndiName(String jndiName)
Specified by:
setJndiName in interface CastorJDOImplMBean

getJndiName

public String getJndiName()
Specified by:
getJndiName in interface CastorJDOImplMBean

setConfiguration

public void setConfiguration(String dbConf)
Specified by:
setConfiguration in interface CastorJDOImplMBean

getConfiguration

public String getConfiguration()
Specified by:
getConfiguration in interface CastorJDOImplMBean

getConfigurationURL

public String getConfigurationURL()
Specified by:
getConfigurationURL in interface CastorJDOImplMBean

setLockTimeout

public void setLockTimeout(int lockTimeout)
Specified by:
setLockTimeout in interface CastorJDOImplMBean

getLockTimeout

public int getLockTimeout()
Specified by:
getLockTimeout in interface CastorJDOImplMBean

setLoggingEnabled

public void setLoggingEnabled(boolean loggingEnabled)
Specified by:
setLoggingEnabled in interface CastorJDOImplMBean

getLoggingEnabled

public boolean getLoggingEnabled()
Specified by:
getLoggingEnabled in interface CastorJDOImplMBean

setCommonClassPath

public void setCommonClassPath(boolean commonClassPath)
Specified by:
setCommonClassPath in interface CastorJDOImplMBean

getCommonClassPath

public boolean getCommonClassPath()
Specified by:
getCommonClassPath in interface CastorJDOImplMBean

setAutoStore

public void setAutoStore(boolean autoStore)
Specified by:
setAutoStore in interface CastorJDOImplMBean
Parameters:
autoStore - True if user prefer all reachable object to be stored automatically. False if user want only dependent object to be stored.

isAutoStore

public boolean isAutoStore()
Specified by:
isAutoStore in interface CastorJDOImplMBean
Returns:
if the next Database instance will be set to autoStore.

setDatabasePooling

public void setDatabasePooling(boolean dbPooling)
True if user prefers to use application server database pools. False if user wants a new connection for each call to getDatabase().

Specified by:
setDatabasePooling in interface CastorJDOImplMBean

isDatabasePooling

public boolean isDatabasePooling()
Return true if the Database instance uses the application server pooling.

Specified by:
isDatabasePooling in interface CastorJDOImplMBean

getDatabase

public Database getDatabase()
                     throws DatabaseNotFoundException,
                            PersistenceException
Throws:
DatabaseNotFoundException
PersistenceException

setDescription

public void setDescription(String description)

getDescription

public String getDescription()

getReference

public Reference getReference()
Specified by:
getReference in interface Referenceable

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context nameCtx,
                                Hashtable environment)
                         throws Exception
Specified by:
getObjectInstance in interface ObjectFactory
Throws:
Exception

loading

public void loading(Class objClass,
                    Object identity)

creating

public void creating(Class objClass,
                     Object identity)

removing

public void removing(Class objClass,
                     Object identity)

storing

public void storing(Class objClass,
                    Object identity)

loading

public void loading(Object objClass,
                    Object identity)

creating

public void creating(Object objClass,
                     Object identity)

removing

public void removing(Object objClass,
                     Object identity)

storing

public void storing(Object objClass,
                    Object identity)

storeStatement

public void storeStatement(String statement)

queryStatement

public void queryStatement(String statement)

message

public void message(String message)

exception

public void exception(Exception except)

getPrintWriter

public PrintWriter getPrintWriter()


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.