org.jboss.jdbc
Class HypersonicDatabase

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.jdbc.HypersonicDatabase
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, HypersonicDatabaseMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class HypersonicDatabase
extends org.jboss.system.ServiceMBeanSupport
implements HypersonicDatabaseMBean

Integration with HSQLDB

Version:
$Revision: 57210 $
Author:
Rickard Öberg, Scott Stark., Peter Fagerlund, Jason Dillon, Claudio Vesco, Dimitris Andreadis

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.jdbc.HypersonicDatabaseMBean
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
HypersonicDatabase()
          Costructor, empty.
 
Method Summary
 String getBindAddress()
          Get the bind address for remote hypersonic.
 String getDatabase()
          Get the database name.
 String getDatabaseManagerClass()
          The database manager (UI) class, default is 'org.hsqldb.util.DatabaseManagerSwing'
 String getDatabasePath()
          Get the full database path.
 boolean getNo_system_exit()
          Get the no_system_exit flag.
 String getPassword()
          The default password to use when connecting to the DB, default is ""
 boolean getPersist()
          Deprecated. use inProcessMode.
 int getPort()
          Get the port for remote hypersonic.
 String getServerClass()
           
 String getShutdownCommand()
          The shutdown command to use when stopping the DB
 boolean getSilent()
          Get silent flag.
 boolean getTrace()
          Get trace flag.
 String getUser()
          The default user to use when connecting to the DB, default is "sa"
 boolean isInProcessMode()
          Whether DB is in in-process mode or remote server mode, default is 'false'
 void setBindAddress(String address)
          Set the bind address for remote hypersonic.
 void setDatabase(String name)
          Set the database name.
 void setDatabaseManagerClass(String databaseManagerClass)
          Set the database manager (UI) class.
 void setInProcessMode(boolean b)
          If true the hypersonic is in process mode otherwise hypersonic is in server or remote mode.
 void setNo_system_exit(boolean no_system_exit)
          If true the server thread for remote hypersonic does no call System.exit().
 void setPassword(String password)
           
 void setPersist(boolean persist)
          Deprecated. use inProcessMode.
 void setPort(int port)
          Set the port for remote hypersonic.
 void setServerClass(String serverClass)
          Set the server class for remote hypersonic.
 void setShutdownCommand(String string)
           
 void setSilent(boolean silent)
          Set silent flag.
 void setTrace(boolean trace)
          Set trace flag.
 void setUser(String user)
           
 void startDatabaseManager()
          Start of DatabaseManager accesible from the management console.
protected  void startService()
          Start the database
protected  void stopService()
          We now close the connection clean by calling the serverSocket throught jdbc.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
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
 

Constructor Detail

HypersonicDatabase

public HypersonicDatabase()
Costructor, empty.

Method Detail

setDatabase

public void setDatabase(String name)
Set the database name.

Specified by:
setDatabase in interface HypersonicDatabaseMBean

getDatabase

public String getDatabase()
Get the database name.

Specified by:
getDatabase in interface HypersonicDatabaseMBean

setPort

public void setPort(int port)
Set the port for remote hypersonic.

Specified by:
setPort in interface HypersonicDatabaseMBean

getPort

public int getPort()
Get the port for remote hypersonic.

Specified by:
getPort in interface HypersonicDatabaseMBean

setBindAddress

public void setBindAddress(String address)
Set the bind address for remote hypersonic.

Specified by:
setBindAddress in interface HypersonicDatabaseMBean

getBindAddress

public String getBindAddress()
Get the bind address for remote hypersonic.

Specified by:
getBindAddress in interface HypersonicDatabaseMBean

setSilent

public void setSilent(boolean silent)
Set silent flag.

Specified by:
setSilent in interface HypersonicDatabaseMBean

getSilent

public boolean getSilent()
Get silent flag.

Specified by:
getSilent in interface HypersonicDatabaseMBean

setTrace

public void setTrace(boolean trace)
Set trace flag.

Specified by:
setTrace in interface HypersonicDatabaseMBean

getTrace

public boolean getTrace()
Get trace flag.

Specified by:
getTrace in interface HypersonicDatabaseMBean

setNo_system_exit

public void setNo_system_exit(boolean no_system_exit)
If true the server thread for remote hypersonic does no call System.exit().

Specified by:
setNo_system_exit in interface HypersonicDatabaseMBean

getNo_system_exit

public boolean getNo_system_exit()
Get the no_system_exit flag.

Specified by:
getNo_system_exit in interface HypersonicDatabaseMBean

setPersist

public void setPersist(boolean persist)
Deprecated. use inProcessMode.

Set persist flag.

Specified by:
setPersist in interface HypersonicDatabaseMBean

getPersist

public boolean getPersist()
Deprecated. use inProcessMode.

Get persist flag.

Specified by:
getPersist in interface HypersonicDatabaseMBean

getDatabasePath

public String getDatabasePath()
Get the full database path.

Specified by:
getDatabasePath in interface HypersonicDatabaseMBean

isInProcessMode

public boolean isInProcessMode()
Description copied from interface: HypersonicDatabaseMBean
Whether DB is in in-process mode or remote server mode, default is 'false'

Specified by:
isInProcessMode in interface HypersonicDatabaseMBean
Returns:
the inProcessMode flag.

getShutdownCommand

public String getShutdownCommand()
Description copied from interface: HypersonicDatabaseMBean
The shutdown command to use when stopping the DB

Specified by:
getShutdownCommand in interface HypersonicDatabaseMBean
Returns:
the shutdown command.

setInProcessMode

public void setInProcessMode(boolean b)
If true the hypersonic is in process mode otherwise hypersonic is in server or remote mode.

Specified by:
setInProcessMode in interface HypersonicDatabaseMBean
Parameters:
b - in process mode or remote mode.

setShutdownCommand

public void setShutdownCommand(String string)
Specified by:
setShutdownCommand in interface HypersonicDatabaseMBean
Parameters:
string - the shutdown command

getPassword

public String getPassword()
Description copied from interface: HypersonicDatabaseMBean
The default password to use when connecting to the DB, default is ""

Specified by:
getPassword in interface HypersonicDatabaseMBean
Returns:
the password

getUser

public String getUser()
Description copied from interface: HypersonicDatabaseMBean
The default user to use when connecting to the DB, default is "sa"

Specified by:
getUser in interface HypersonicDatabaseMBean
Returns:
the user

setPassword

public void setPassword(String password)
Specified by:
setPassword in interface HypersonicDatabaseMBean
Parameters:
password -

setUser

public void setUser(String user)
Specified by:
setUser in interface HypersonicDatabaseMBean
Parameters:
user -

getDatabaseManagerClass

public String getDatabaseManagerClass()
Description copied from interface: HypersonicDatabaseMBean
The database manager (UI) class, default is 'org.hsqldb.util.DatabaseManagerSwing'

Specified by:
getDatabaseManagerClass in interface HypersonicDatabaseMBean
Returns:

setDatabaseManagerClass

public void setDatabaseManagerClass(String databaseManagerClass)
Set the database manager (UI) class.

Specified by:
setDatabaseManagerClass in interface HypersonicDatabaseMBean
Parameters:
databaseManagerClass -

getServerClass

public String getServerClass()
Returns:
server class for remote hypersonic.

setServerClass

public void setServerClass(String serverClass)
Set the server class for remote hypersonic.

Parameters:
serverClass -

startDatabaseManager

public void startDatabaseManager()
Start of DatabaseManager accesible from the management console.

Specified by:
startDatabaseManager in interface HypersonicDatabaseMBean

startService

protected void startService()
                     throws Exception
Start the database

Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
We now close the connection clean by calling the serverSocket throught jdbc. The MBeanServer calls this method at closing time.

Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.