You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2009/10/22 03:02:07 UTC

svn commit: r828266 - in /openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/openejb/ src/main/java/org/apache/openejb/core/ src/main/java/org/apa...

Author: jlaskowski
Date: Thu Oct 22 01:02:06 2009
New Revision: 828266

URL: http://svn.apache.org/viewvc?rev=828266&view=rev
Log:
Activator for starting up OpenEJB - it works!

Added:
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/broker/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/broker/openejb   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/default.openejb.conf   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/login.config   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties   (with props)
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/test/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/test/java/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/test/java/org/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/test/java/org/apache/
    openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/test/java/org/apache/openejb/

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml Thu Oct 22 01:02:06 2009
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>container</artifactId>
+    <groupId>org.apache.openejb</groupId>
+    <version>3.1.2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>openejb-core-osgi</artifactId>
+  <packaging>bundle</packaging>
+  <name>OpenEJB :: Container :: Core :: OSGi</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+	  <version>${version}</version>
+    </dependency>
+	<dependency>
+	    <groupId>org.apache.felix</groupId>
+	    <artifactId>org.osgi.core</artifactId>
+	    <version>1.2.0</version>
+	</dependency> 
+    <dependency>
+      <groupId>org.apache.geronimo.components</groupId>
+      <artifactId>geronimo-transaction</artifactId>
+    </dependency>
+  </dependencies>
+  <build>
+	<plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+  <artifactId>maven-bundle-plugin</artifactId>
+  <configuration>
+    <instructions>
+      <Bundle-Activator>org.apache.openejb.core.osgi.impl.Activator</Bundle-Activator>
+      <Require-Bundle>org.apache.openejb.core</Require-Bundle>
+      <Export-Package>org.apache.openejb.core.osgi.*</Export-Package>
+      <Import-Package>org.apache.openejb.resource.activemq,org.apache.activemq.ra,javax.jms,org.apache.commons.logging,org.apache.openejb;version="3.1",org.apache.openejb.core.osgi.impl,org.apache.openejb.loader;version="3.1",org.apache.openejb.util;version="3.1",org.osgi.framework;version="1.4",javax.transaction;version="[1.1,1.2)",javax.transaction.xa;version="[1.1,1.2)",javax.naming,org.apache.openejb.client</Import-Package>
+    </instructions>
+  </configuration>
+</plugin>
+	</plugins>
+</build>
+</project>

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java Thu Oct 22 01:02:06 2009
@@ -0,0 +1,64 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.core.osgi.impl;
+
+import java.util.Properties;
+
+import org.apache.openejb.OpenEJB;
+import org.apache.openejb.loader.OpenEJBInstance;
+import org.apache.openejb.loader.SystemInstance;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Activator implements BundleActivator {
+
+    private OpenEJBInstance openejb;
+    
+    public void start(BundleContext ctx) throws Exception {
+
+        System.out.println("Activator started");
+        
+        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+
+        openejb = new OpenEJBInstance();
+        
+        Properties env = new Properties();
+        //env.setProperty("openejb.embedded", "true");
+        // default, but to remember that the setting exists
+        env.setProperty("openejb.loader", "osgi");
+        // NPE
+        env.setProperty("openejb.deployments.classpath", "false");
+        // Else it doesn't work - ClassNotFoundException: org.apache.log4j.Layout
+        env.setProperty("openejb.log.factory", "org.apache.openejb.util.JuliLogStreamFactory");
+        
+        SystemInstance.init(env);
+        // OptionsLog.install();
+
+        // OpenEJB.init(env);
+        openejb.init(env);
+    }
+
+    public void stop(BundleContext ctx) throws Exception {
+        openejb = null;
+        OpenEJB.destroy();
+    }
+
+}

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/java/org/apache/openejb/core/osgi/impl/Activator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml Thu Oct 22 01:02:06 2009
@@ -0,0 +1,763 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<ServiceJar>
+
+  <!--
+  #===================================================================#
+  #       D E F A U L T    O P E N E J B    S E R V I C E S           #
+  #===================================================================#
+  #
+  #
+  #  This file defines all the default configurations of containers,
+  #  factories, managers and services that come with OpenEJB.
+  #
+  #  Can contain numerous configurations of the standard services
+  #  making it easy for users to simply name the one they want in
+  #  their configuration files.
+  #
+  #  Over time this will be become a library of default
+  #  configurations
+  -->
+
+  <!--
+  # ==========================================================
+  # Default Container-Managed Persistence EntityBean Container
+  # ==========================================================
+  -->
+  <ServiceProvider id="Default CMP Container"
+                   service="Container"
+                   types="CMP_ENTITY"
+                   constructor="id, transactionManager, securityService, CmpEngineFactory"
+                   class-name="org.apache.openejb.core.cmp.CmpContainer">
+
+    CmpEngineFactory org.apache.openejb.core.cmp.jpa.JpaCmpEngineFactory
+  </ServiceProvider>
+
+  <!--
+  # ==========================================================
+  # Default Bean-Managed Persistence EntityBean Container
+  # ==========================================================
+  -->
+  <ServiceProvider
+          id="Default BMP Container"
+          service="Container"
+          types="BMP_ENTITY"
+          constructor="id, securityService, PoolSize"
+          class-name="org.apache.openejb.core.entity.EntityContainer">
+
+    # Specifies the size of the bean pools for this
+    # bmp entity container.
+
+    PoolSize 10
+
+</ServiceProvider>
+
+
+
+  <!--
+  # ==========================================================
+  # Default Stateless SessinBean Container
+  # ==========================================================
+  -->
+  <ServiceProvider
+          id="Default Stateless Container"
+          service="Container"
+          types="STATELESS"
+          constructor="id, securityService, TimeOut, PoolSize, StrictPooling"
+          class-name="org.apache.openejb.core.stateless.StatelessContainer">
+
+    # Specifies the time to wait between invocations. This
+    # value is measured in milliseconds. A value of 5 would
+    # result in a time-out of 5 milliseconds between invocations.
+    # A value of zero would mean no timeout.
+
+    TimeOut 0
+
+    # Specifies the size of the bean pools for this
+    # stateless SessionBean container.
+
+    PoolSize 10
+
+    # StrictPooling tells the container what to do when the pool
+    # reaches it's maximum size and there are incoming requests
+    # that need instances.
+    #
+    # With strict pooling, requests will have to wait for instances
+    # to become available. The pool size will never grow beyond the
+    # the set PoolSize value.
+    #
+    # Without strict pooling, the container will create temporary
+    # instances to meet demand. The instances will last for just one
+    # method invocation and then are removed.
+
+    StrictPooling true
+
+
+  </ServiceProvider>
+
+
+  <!--
+  # ==========================================================
+  # Default Singleton SessinBean Container
+  # ==========================================================
+  -->
+  <ServiceProvider
+          id="Default Singleton Container"
+          service="Container"
+          types="SINGLETON"
+          constructor="id, securityService"
+          class-name="org.apache.openejb.core.singleton.SingletonContainer">
+
+    AccessTimeout = 30 seconds
+    
+  </ServiceProvider>
+
+
+  <!--
+  # ==========================================================
+  # Default Stateful SessinBean Container
+  # ==========================================================
+  -->
+  <ServiceProvider
+          id="Default Stateful Container"
+          service="Container"
+          types="STATEFUL"
+          factory-name="create"
+          class-name="org.apache.openejb.core.stateful.StatefulContainerFactory">
+
+    # The cache is responsible for managing stateful bean
+    # instances.  The cache can page instances to disk as memory
+    # is filled and can destroy abandoned instances.  A different
+    # cache implementation can be used by setting this property
+    # to the fully qualified class name of the Cache implementation.
+
+    Cache org.apache.openejb.core.stateful.SimpleCache
+
+    # The passivator is responsible for writing beans to disk
+    # at passivation time. Different passivators can be used
+    # by setting this property to the fully qualified class name
+    # of the PassivationStrategy implementation. The passivator
+    # is not responsible for invoking any callbacks or other
+    # processing, its only responsibly is to write the bean state
+    # to disk.
+    #
+    # Known implementations:
+    # org.apache.openejb.core.stateful.RAFPassivater
+    # org.apache.openejb.core.stateful.SimplePassivater
+
+    Passivator org.apache.openejb.core.stateful.SimplePassivater
+
+    # Specifies the time to wait between invocations. This
+    # value is measured in minutes. A value of 5 would
+    # result in a time-out of 5 minutes between invocations.
+    # A value of zero would mean no timeout.
+
+    TimeOut 20
+
+    # Specifies the size of the bean pools for this
+    # stateful SessionBean container.
+
+    Capacity 1000
+
+    # Property name that specifies the number of instances
+    # to passivate at one time when doing bulk passivation.
+
+    BulkPassivate 100
+
+  </ServiceProvider>
+
+  <!--
+  # ==========================================================
+  # Default Message Driven Container
+  # ==========================================================
+  -->
+  <ServiceProvider
+          id="Default MDB Container"
+          service="Container"
+          types="MESSAGE"
+          constructor="id, securityService, ResourceAdapter, MessageListenerInterface, ActivationSpecClass, InstanceLimit"
+          class-name="org.apache.openejb.core.mdb.MdbContainer">
+
+    # The resource adapter delivers messages to the container
+
+    ResourceAdapter Default JMS Resource Adapter
+
+    # Specifies the message listener interface handled by this container
+
+    MessageListenerInterface javax.jms.MessageListener
+
+    # Specifies the activation spec class
+
+    ActivationSpecClass org.apache.activemq.ra.ActiveMQActivationSpec
+
+    # Specifies the maximum number of bean instances that are
+    # allowed to exist for each MDB deployment.
+
+    InstanceLimit 10
+
+  </ServiceProvider>
+
+  <!--
+  # ================================================
+  # Default Proxy Factory implementation for JDK 1.3
+  # ================================================
+  -->
+  <ServiceProvider
+          id="Default JDK 1.3 ProxyFactory"
+          service="ProxyFactory"
+          types="ProxyFactory"
+          class-name="org.apache.openejb.util.proxy.Jdk13ProxyFactory"/>
+
+  <!--
+  # ================================================
+  # Default Security Service implementation
+  # ================================================
+  -->
+  <ServiceProvider
+          id="Default Security Service"
+          service="SecurityService"
+          types="SecurityService"
+          class-name="org.apache.openejb.core.security.SecurityServiceImpl"/>
+
+  <ServiceProvider
+          id="PseudoSecurityService"
+          service="SecurityService"
+          types="SecurityService"
+          class-name="org.apache.openejb.ri.sp.PseudoSecurityService"/>
+
+  <!--
+  # ================================================
+  # Default Transaction Manager implementation
+  # ================================================
+  -->
+    <ServiceProvider
+            id="Default Transaction Manager"
+            service="TransactionManager"
+            types="TransactionManager"
+            factory-name="create"
+            constructor="defaultTransactionTimeoutSeconds, TxRecovery, tmId, bufferClassName, bufferSizeKb, checksumEnabled, adler32Checksum, flushSleepTimeMilliseconds, logFileDir, logFileExt, logFileName, maxBlocksPerFile, maxBuffers, maxLogFiles, minBuffers, threadsWaitingForceThreshold"
+            class-name="org.apache.openejb.resource.GeronimoTransactionManagerFactory">
+           defaultTransactionTimeoutSeconds 600
+           TxRecovery false
+           bufferSizeKb 32
+           checksumEnabled true
+           adler32Checksum true
+           flushSleepTimeMilliseconds 50
+           logFileDir txlog
+           logFileExt log
+           logFileName howl
+           maxBlocksPerFile -1
+           maxBuffers 0
+           maxLogFiles 2
+           minBuffers 4
+           threadsWaitingForceThreshold -1
+    </ServiceProvider>
+
+  <!--
+  # ================================================
+  # Default JCA ManagedConnectionFactory for JDBC
+  # ================================================
+  -->
+  <ServiceProvider
+          id="Default JDBC Database"
+          service="Resource"
+          types="javax.sql.DataSource, DataSource"
+          factory-name="create"
+          constructor="JtaManaged"
+          class-name="org.apache.openejb.resource.jdbc.DataSourceFactory">
+
+    # Determines wether or not this data source should be JTA managed
+    # or user managed.  If set to 'true' it will automatically be enrolled
+    # in any ongoing transactions.  Calling begin/commit/rollback or setAutoCommit
+    # on the datasource or connection will not be allowed.  If you need to perform
+    # these functions yourself, set JtaManaged to 'false'
+    #
+    # In terms of JPA persistence.xml:
+    # "JtaManaged=true" can be used as a 'jta-data-source'
+    # "JtaManaged=false" can be used as a 'non-jta-data-source'
+
+    JtaManaged = false
+
+    # Driver class name
+
+    JdbcDriver org.hsqldb.jdbcDriver
+
+    # Url for creating connections
+
+    JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
+
+    # Default user name
+
+    UserName sa
+
+    # Default password
+
+    Password
+
+    PasswordCipher  PlainText
+
+
+    # The connection properties that will be sent to the JDBC
+    # driver when establishing new connections
+    #
+    # Format of the string must be [propertyName=property;]*
+    #
+    # NOTE - The "user" and "password" properties will be passed
+    # explicitly, so they do not need to be included here.
+
+    ConnectionProperties
+
+    # The default auto-commit state of new connections
+
+    DefaultAutoCommit true
+
+    # The default read-only state of new connections
+    # If not set then the setReadOnly method will not be called.
+    # (Some drivers don't support read only mode, ex: Informix)
+
+    DefaultReadOnly
+
+
+    # The default TransactionIsolation state of new connections
+    # If not set then the setTransactionIsolation method will not
+    # be called. The allowed values for this property are:
+    #     NONE
+    #     READ_COMMITTED
+    #     READ_UNCOMMITTED
+    #     REPEATABLE_READ
+    #     SERIALIZABLE
+    #
+    # Note: Most JDBC drivers do not support all isolation levels
+
+    DefaultTransactionIsolation
+
+
+    # The initial number of connections that are created when the
+    # pool is started
+
+    InitialSize	0
+
+    # The maximum number of active connections that can be
+    # allocated from this pool at the same time, or a negative
+    # number for no limit.
+
+    MaxActive	20
+
+    # The maximum number of connections that can remain idle in
+    # the pool, without extra ones being released, or a negative
+    # number for no limit.
+
+    MaxIdle	20
+
+    # The minimum number of connections that can remain idle in
+    # the pool, without extra ones being created, or zero to
+    # create none.
+
+    MinIdle	0
+
+    # The maximum number of milliseconds that the pool will wait
+    # (when there are no available connections) for a connection
+    # to be returned before throwing an exception, or -1 to wait
+    # indefinitely.
+
+    MaxWait	-1
+
+    # The SQL query that will be used to validate connections from
+    # this pool before returning them to the caller. If specified,
+    # this query MUST be an SQL SELECT statement that returns at
+    # least one row.
+
+    ValidationQuery
+
+    # If true connections will be validated before being returned
+    # from the pool. If the validation fails, the connection is
+    # destroyed, and a new conection will be retrieved from the
+    # pool (and validated).
+    #
+    # NOTE - for a true value to have any effect, the
+    # ValidationQuery parameter must be set.
+
+    TestOnBorrow	true
+
+    # If true connections will be validated before being returned
+    # to the pool.  If the validation fails, the connection is
+    # destroyed instead of being returned to the pool.
+    #
+    # NOTE - for a true value to have any effect, the
+    # ValidationQuery parameter must be set.
+
+    TestOnReturn	false
+
+    # If true connections will be validated by the idle connection
+    # evictor (if any). If the validation fails, the connection is
+    # destroyed and removed from the pool
+    #
+    # NOTE - for a true value to have any effect, the
+    # timeBetweenEvictionRunsMillis property must be a positive
+    # number and the ValidationQuery parameter must be set.
+
+    TestWhileIdle	false
+
+    # The number of milliseconds to sleep between runs of the idle
+    # connection evictor thread. When set to a negative number, no
+    # idle connection evictor thread will be run.
+
+    TimeBetweenEvictionRunsMillis	-1
+
+    # The number of connectionss to examine during each run of the
+    # idle connection evictor thread (if any).
+
+    NumTestsPerEvictionRun	3
+
+    # The minimum amount of time a connection may sit idle in the
+    # pool before it is eligable for eviction by the idle
+    # connection evictor (if any).
+
+    MinEvictableIdleTimeMillis	1800000
+
+    # If true, a statement pool is created for each Connection and
+    # PreparedStatements created by one of the following methods are
+    # pooled:
+    #    public PreparedStatement prepareStatement(String sql);
+    #    public PreparedStatement prepareStatement(String sql,
+    #            int resultSetType,
+    #            int resultSetConcurrency)
+
+    PoolPreparedStatements false
+
+    # The maximum number of open statements that can be allocated
+    # from the statement pool at the same time, or zero for no
+    # limit.
+    #
+    # NOTE - Some drivers have limits on the number of open
+    # statements, so make sure there are some resources left
+    # for the other (non-prepared) statements.
+
+    MaxOpenPreparedStatements 0
+
+    # If true the raw physical connection to the database can be
+    # accessed using the following construct:
+    #     Connection conn = ds.getConnection();
+    #     Connection rawConn = ((DelegatingConnection) conn).getInnermostDelegate();
+    #     ...
+    #     conn.close()
+    #
+    # Default is false, because misbehaving programs can do harmfull
+    # things to the raw connection shuch as closing the raw
+    # connection or continuing to use the raw connection after it
+    # has been assigned to another logical connection.  Be carefull
+    # and only use when you need direct access to driver specific
+    # extentions.
+    #
+    # NOTE: Do NOT close the underlying connection, only the
+    # original logical connection wrapper.
+
+    AccessToUnderlyingConnectionAllowed	false
+  </ServiceProvider>
+
+  <ServiceProvider
+          id="Default Unmanaged JDBC Database"
+          service="Resource"
+          types="javax.sql.DataSource, DataSource"
+          factory-name="create"
+          constructor="JtaManaged"
+          class-name="org.apache.openejb.resource.jdbc.DataSourceFactory">
+
+    JtaManaged = false
+
+    # Driver class name
+
+    JdbcDriver org.hsqldb.jdbcDriver
+
+    # Url for creating connections
+
+    JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
+
+    # Default user name
+
+    UserName sa
+
+    # Default password
+
+    Password
+
+    PasswordCipher  PlainText
+
+    # The connection properties that will be sent to the JDBC
+    # driver when establishing new connections
+    #
+    # Format of the string must be [propertyName=property;]*
+    #
+    # NOTE - The "user" and "password" properties will be passed
+    # explicitly, so they do not need to be included here.
+
+    ConnectionProperties
+
+    # The default auto-commit state of new connections
+
+    DefaultAutoCommit true
+
+    # The default read-only state of new connections
+    # If not set then the setReadOnly method will not be called.
+    # (Some drivers don't support read only mode, ex: Informix)
+
+    DefaultReadOnly
+
+
+    # The default TransactionIsolation state of new connections
+    # If not set then the setTransactionIsolation method will not
+    # be called. The allowed values for this property are:
+    #     NONE
+    #     READ_COMMITTED
+    #     READ_UNCOMMITTED
+    #     REPEATABLE_READ
+    #     SERIALIZABLE
+    #
+    # Note: Most JDBC drivers do not support all isolation levels
+
+    DefaultTransactionIsolation
+
+
+    # The initial number of connections that are created when the
+    # pool is started
+
+    InitialSize	0
+
+    # The maximum number of active connections that can be
+    # allocated from this pool at the same time, or a negative
+    # number for no limit.
+
+    MaxActive	10
+
+    # The maximum number of connections that can remain idle in
+    # the pool, without extra ones being released, or a negative
+    # number for no limit.
+
+    MaxIdle	10
+
+    # The minimum number of connections that can remain idle in
+    # the pool, without extra ones being created, or zero to
+    # create none.
+
+    MinIdle	0
+
+    # The maximum number of milliseconds that the pool will wait
+    # (when there are no available connections) for a connection
+    # to be returned before throwing an exception, or -1 to wait
+    # indefinitely.
+
+    MaxWait	-1
+
+    # The SQL query that will be used to validate connections from
+    # this pool before returning them to the caller. If specified,
+    # this query MUST be an SQL SELECT statement that returns at
+    # least one row.
+
+    ValidationQuery
+
+    # If true connections will be validated before being returned
+    # from the pool. If the validation fails, the connection is
+    # destroyed, and a new conection will be retrieved from the
+    # pool (and validated).
+    #
+    # NOTE - for a true value to have any effect, the
+    # ValidationQuery parameter must be set.
+
+    TestOnBorrow	true
+
+    # If true connections will be validated before being returned
+    # to the pool.  If the validation fails, the connection is
+    # destroyed instead of being returned to the pool.
+    #
+    # NOTE - for a true value to have any effect, the
+    # ValidationQuery parameter must be set.
+
+    TestOnReturn	false
+
+    # If true connections will be validated by the idle connection
+    # evictor (if any). If the validation fails, the connection is
+    # destroyed and removed from the pool
+    #
+    # NOTE - for a true value to have any effect, the
+    # timeBetweenEvictionRunsMillis property must be a positive
+    # number and the ValidationQuery parameter must be set.
+
+    TestWhileIdle	false
+
+    # The number of milliseconds to sleep between runs of the idle
+    # connection evictor thread. When set to a negative number, no
+    # idle connection evictor thread will be run.
+
+    TimeBetweenEvictionRunsMillis	-1
+
+    # The number of connectionss to examine during each run of the
+    # idle connection evictor thread (if any).
+
+    NumTestsPerEvictionRun	3
+
+    # The minimum amount of time a connection may sit idle in the
+    # pool before it is eligable for eviction by the idle
+    # connection evictor (if any).
+
+    MinEvictableIdleTimeMillis	1800000
+
+    # If true, a statement pool is created for each Connection and
+    # PreparedStatements created by one of the following methods are
+    # pooled:
+    #    public PreparedStatement prepareStatement(String sql);
+    #    public PreparedStatement prepareStatement(String sql,
+    #            int resultSetType,
+    #            int resultSetConcurrency)
+
+    PoolPreparedStatements false
+
+    # The maximum number of open statements that can be allocated
+    # from the statement pool at the same time, or zero for no
+    # limit.
+    #
+    # NOTE - Some drivers have limits on the number of open
+    # statements, so make sure there are some resources left
+    # for the other (non-prepared) statements.
+
+    MaxOpenPreparedStatements 0
+
+    # If true the raw physical connection to the database can be
+    # accessed using the following construct:
+    #     Connection conn = ds.getConnection();
+    #     Connection rawConn = ((DelegatingConnection) conn).getInnermostDelegate();
+    #     ...
+    #     conn.close()
+    #
+    # Default is false, because misbehaving programs can do harmfull
+    # things to the raw connection shuch as closing the raw
+    # connection or continuing to use the raw connection after it
+    # has been assigned to another logical connection.  Be carefull
+    # and only use when you need direct access to driver specific
+    # extentions.
+    #
+    # NOTE: Do NOT close the underlying connection, only the
+    # original logical connection wrapper.
+
+    AccessToUnderlyingConnectionAllowed	false
+  </ServiceProvider>
+
+  <!--
+  # ================================================
+  # Default JMS
+  # ================================================
+  -->
+  <ServiceProvider
+          id="Default JMS Resource Adapter"
+          service="Resource"
+          types="ActiveMQResourceAdapter"
+          class-name="org.apache.openejb.resource.activemq.ActiveMQResourceAdapter">
+
+    # Broker configuration
+    BrokerXmlConfig broker:(tcp://localhost:61616)?useJmx=false
+
+    # Broker address
+    ServerUrl vm://localhost?async=true
+
+    # DataSource for persistence messages
+    DataSource Default Unmanaged JDBC Database
+
+  </ServiceProvider>
+
+  <ServiceProvider
+          id="Default JMS Connection Factory"
+          service="Resource"
+          types="javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory, javax.jms.TopicConnectionFactory, QueueConnectionFactory, TopicConnectionFactory"
+          class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
+
+    ResourceAdapter Default JMS Resource Adapter
+
+    # Specifies if the connection is enrolled in global transaction
+    # allowed values: xa, local or none
+    TransactionSupport xa
+
+    # Maximum number of physical connection to the ActiveMQ broker
+    PoolMaxSize 10
+
+    # Minimum number of physical connection to the ActiveMQ broker
+    PoolMinSize 0
+
+    # Maximum amount of time to wait for a connection
+    ConnectionMaxWaitMilliseconds 5000
+
+    # Maximum amount of time a connection can be idle before being reclaimed
+    ConnectionMaxIdleMinutes 15
+  </ServiceProvider>
+
+  <ServiceProvider
+          id="Default Queue"
+          service="Resource"
+          types="javax.jms.Queue, Queue"
+          constructor="destination"
+          class-name="org.apache.activemq.command.ActiveMQQueue">
+
+    # Specifies the name of the queue
+
+    destination
+  </ServiceProvider>
+
+  <ServiceProvider
+          id="Default Topic"
+          service="Resource"
+          types="javax.jms.Topic, Topic"
+          constructor="destination"
+          class-name="org.apache.activemq.command.ActiveMQTopic">
+
+    # Specifies the name of the topic
+
+    destination
+  </ServiceProvider>
+
+  <!--
+  # ================================================
+  # Default ORB
+  # ================================================
+  -->
+  <ServiceProvider
+          id="Default ORB"
+          service="Resource"
+          types="org.omg.CORBA.ORB, ORB"
+          factory-name="create"
+          class-name="org.apache.openejb.core.OrbFactory">
+
+  </ServiceProvider>
+
+  <!--
+  # ================================================
+  # Default ORB
+  # ================================================
+  -->
+  <ServiceProvider
+          id="Default Mail Session"
+          service="Resource"
+          types="javax.mail.Session"
+          factory-name="create"
+          class-name="org.apache.openejb.core.MailSessionFactory">
+
+  </ServiceProvider>
+
+
+</ServiceJar>

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/org.apache.openejb/service-jar.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/broker/openejb
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/broker/openejb?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/broker/openejb (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/broker/openejb Thu Oct 22 01:02:06 2009
@@ -0,0 +1 @@
+class=org.apache.openejb.resource.activemq.OpenEjbBrokerFactory
\ No newline at end of file

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/META-INF/services/org/apache/activemq/broker/openejb
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/default.openejb.conf
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/default.openejb.conf?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/default.openejb.conf (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/default.openejb.conf Thu Oct 22 01:02:06 2009
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openejb>
+
+<Container id="My Stateless Container" type="STATELESS">
+  #  Specifies the time to wait between invocations. This
+  #  value is measured in milliseconds.  A value of 5 would
+  #  result in a time-out of 5 milliseconds between invocations.
+  #  A value of zero would mean no timeout.
+
+  TimeOut  0
+
+  #  Specifies the size of the bean pools for this
+  #  stateless SessionBean container.
+
+  PoolSize  10
+
+  #  StrictPooling tells the container what to do when the pool
+  #  reaches it's maximum size and there are incoming requests
+  #  that need instances.
+  #
+  #  With strict pooling, requests will have to wait for instances
+  #  to become available.  The pool size will never grow beyond the
+  #  the set PoolSize value.
+  #
+  #  Without strict pooling, the container will create temporary
+  #  instances to meet demand.  The instances will last for just one
+  #  method invocation and then are removed.
+
+  StrictPooling  true
+
+</Container>
+
+<!--
+#
+#  The <Deployments> element can be used to configure file
+#  paths where OpenEJB should look for ejb jars or ear files.
+#
+#  See http://openejb.apache.org/deployments.html
+#
+#  The below entry is simply a default and can be changed or deleted
+-->
+<Deployments dir="apps/" />
+
+</openejb>

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/default.openejb.conf
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties Thu Oct 22 01:02:06 2009
@@ -0,0 +1,67 @@
+# ---------------------------------------------------
+# The configuration below is good for standalone
+# scenarios.  There's a log file and everything is
+# time stamped and settings are slightly more verbose.
+#
+# For embedded scenarios the commented out configuration
+# below is a much better fit.
+#
+log4j.category.OpenEJB             = warn,R
+log4j.category.OpenEJB.options     = info
+log4j.category.OpenEJB.server      = info
+log4j.category.OpenEJB.startup     = info
+log4j.category.OpenEJB.startup.service = info
+log4j.category.OpenEJB.startup.config = info
+log4j.category.OpenEJB.hsql        = info
+log4j.category.OpenEJB.ws          = info
+log4j.category.OpenEJB.tomcat      = info
+log4j.category.CORBA-Adapter       = error,R
+log4j.category.Transaction         = warn,TX
+log4j.category.org.apache.activemq = error,R
+log4j.category.org.apache.geronimo = error,R
+log4j.category.openjpa             = error,R
+log4j.category.axis                = info,R
+log4j.category.axis2               = info,R
+log4j.category.cxf                 = info,R
+log4j.category.org.apache.cxf      = info,R
+
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.MaxFileSize=1000KB
+log4j.appender.R.MaxBackupIndex=7
+log4j.appender.R.File=openejb.log
+log4j.appender.R.layout.ConversionPattern=%d - %-5p - %m%n
+
+log4j.appender.TX=org.apache.log4j.RollingFileAppender
+log4j.appender.TX.layout=org.apache.log4j.PatternLayout
+log4j.appender.TX.MaxFileSize=1000KB
+log4j.appender.TX.MaxBackupIndex=100
+log4j.appender.TX.File=transaction.log
+log4j.appender.TX.layout.ConversionPattern=%d - %-5p - %m%n
+
+
+## ---------------------------------------------------
+## Nice alternate configuration for embedded testing
+##
+## Output is slightly more terse and sent to System.out
+##
+## Simply comment out the above declarations and
+## uncomment the configuration below.
+##
+#
+#log4j.rootLogger                   = fatal,C
+#log4j.category.OpenEJB             = warn
+#log4j.category.OpenEJB.options     = info
+#log4j.category.OpenEJB.server      = info
+#log4j.category.OpenEJB.startup     = info
+#log4j.category.OpenEJB.startup.service = warn
+#log4j.category.OpenEJB.startup.config = info
+#log4j.category.OpenEJB.hsql        = info
+#log4j.category.CORBA-Adapter       = info
+#log4j.category.Transaction         = warn
+#log4j.category.org.apache.activemq = error
+#log4j.category.org.apache.geronimo = error
+#log4j.category.openjpa             = error
+#
+#log4j.appender.C                           = org.apache.log4j.ConsoleAppender
+#log4j.appender.C.layout                    = org.apache.log4j.SimpleLayout

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/logging.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/login.config
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/login.config?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/login.config (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/login.config Thu Oct 22 01:02:06 2009
@@ -0,0 +1,12 @@
+PropertiesLogin {
+    org.apache.openejb.core.security.jaas.PropertiesLoginModule required
+        Debug=true
+        UsersFile="users.properties"
+        GroupsFile="groups.properties";
+};
+SQLLogin {
+    org.apache.openejb.core.security.jaas.SQLLoginModule required
+    	jdbcURL="jdbc:hsqldb:mem:sqltest"
+    	userSelect="SELECT user, password FROM users WHERE user = ?"
+    	groupSelect="SELECT user, grp FROM groups WHERE user = ?";
+};
\ No newline at end of file

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/login.config
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties?rev=828266&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties (added)
+++ openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties Thu Oct 22 01:02:06 2009
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Rev$ $Date$
+#
+copyright=Copyright 1999-2009 (C) Apache OpenEJB Project, All Rights Reserved.
+url=http://openejb.apache.org/
+version=${pom.version}
+date=@DATE-REPLACED-BY-MAVEN@
+time=@TIME-REPLACED-BY-MAVEN@

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/resources/openejb-version.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain