![]() |
![]() |
![]() |
![]() |
![]() |
||||
![]() |
Home |
![]() |
||||||
![]() |
![]() |
![]() |
![]() |
![]() |
||||
Short OverviewConfiguration Properties
Configuration FileShow a config file with the elements hyperlinked. openejb.conf <?xml version="1.0"?> <openejb> <Container id="Default CMP Container" ctype="CMP_ENTITY"> Global_TX_Database c:/my/app/conf/postgresql.cmp_global_database.xml Local_TX_Database c:/my/app/conf/postgresql.cmp_local_database.xml </Container> <Connector id="Default JDBC Database"> JdbcDriver org.postgresql.Driver JdbcUrl jdbc:postgresql://localhost/mydb UserName username Password password </Connector> <SecurityService id="Default Security Service"/> <TransactionService id="Default Transaction Manager"/> <Deployments jar="c:/my/app/employee.jar"/> <Deployments dir="beans/" /> </openejb> Basic LayoutBasically, openejb.base is the source for 100% of all configuration information and third party config files (log4j, castor, instantdb, whatever). This includes finding where the, possibly many, <Deployment> entries in the openejb.conf point. The openejb.home is where the code loading OpenEJB will look for all the OpenEJB libraries. Usually openejb.base is not explicitly set and defaults to the value of openejb.home, so many people are used to only dealing with openejb.home. The point of having and openejb.base and openejb.home was basically to allow several independently configured instances of OpenEJB running on a system (perhaps embedded in Swing apps, in Tomcat, running as a standalone Server, or even in Groovy as Mr. Strachan did!) but without the need to copy all the OpenEJB system libraries everywhere. openejb.home
openejb.base
openejb.configuration
relative paths in openejb.conf
log files
OpenEJB libraries
SummaryA summary of the above in a different notation: openejb.home = user.dir (can be set explicitly) openejb.base = openejb.home (can be set explicitly) openejb.conf = openejb.base/conf/openejb.conf (can be set explicitly) logging.conf = openejb.base/conf/logging.conf (can be set explicitly) deployments = paths listed in openejb.conf (relative paths resolved from openejb.base) Classpath includes openejb.home/lib and openejb.home/dist Example layoutIn this one the openejb.home and openejb.base are set, everything else is defaulted. The openejb.conf file as been updated to point to the ejb jars by name (abc-ejbs.jar and xyz-ejbs.jar). An example layout: /usr/local/openejb (openejb.home) /usr/local/openejb/lib (in classpath) /usr/local/openejb/dist (in classpath) /home/jsmith/foo_app (openejb.base) /home/jsmith/foo_app/conf/openejb.conf /home/jsmith/foo_app/conf/logging.conf /home/jsmith/foo_app/abc-ejbs.jar (Deployment entry in openejb.conf) /home/jsmith/foo_app/xyz-ejbs.jar (Deployment entry in openejb.conf) /home/jsmith/foo_app/logs/ Another Example layoutIn this example openejb.home and openejb.base are setup as well as the explicit paths for the openejb and log4j configuration files. An example layout: /usr/local/openejb (openejb.home) /usr/local/openejb/lib (in classpath) /usr/local/openejb/dist (in classpath) /home/jsmith/foo_app (openejb.base) /home/jsmith/foo_app/openejb.xml (openejb.configuration) /home/jsmith/foo_app/abc-ejbs.jar (Deployment entry in openejb.xml) /home/jsmith/foo_app/xyz-ejbs.jar (Deployment entry in openejb.xml) /home/jsmith/foo_app/log4j.conf (log4j.configuration) /home/jsmith/foo_app/mylogs/ (logging dir as defined in log4j.conf) |
![]() |
|||||||
|
![]() |