You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/08/27 08:23:42 UTC

svn commit: r1377576 [1/2] - in /openejb/trunk/openejb/container: openejb-core/src/main/java/org/apache/openejb/config/ openejb-core/src/main/java/org/apache/openejb/config/typed/ openejb-core/src/main/java/org/apache/openejb/config/typed/foo/ openejb-...

Author: dblevins
Date: Mon Aug 27 06:23:40 2012
New Revision: 1377576

URL: http://svn.apache.org/viewvc?rev=1377576&view=rev
Log:
TOMEE-405 - Strongly typed API for configuration
Just an experiment

Added:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ActiveMQResourceAdapterBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/BmpEntityContainerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/CmpEntityContainerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/DataSourceBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/InitialContextBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JavaMailSessionBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JmsConnectionFactoryBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ManagedContainerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/MessageDrivenContainerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ORBBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ProxyFactoryBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/QueueBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SecurityServiceBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SingletonContainerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatefulContainerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatelessContainerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TopicBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TransactionManagerBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/foo/
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/util/
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/util/Builders.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/util/ObjectMap.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/util/ProviderGenerator.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/util/ServerContext.java
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/typed/
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/typed/util/
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/typed/util/ServerContextTest.java
Modified:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/util/Archives.java
    openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/IO.java

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java?rev=1377576&r1=1377575&r2=1377576&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java Mon Aug 27 06:23:40 2012
@@ -943,7 +943,7 @@ public class ConfigurationFactory implem
             }
 
 
-            final String providerType = service.getClass().getSimpleName();
+            final String providerType = getProviderType(service);
 
             ServiceProvider provider = resolveServiceProvider(service, infoType);
 
@@ -969,14 +969,16 @@ public class ConfigurationFactory implem
 
             final Properties overrides = trim(getSystemProperties(service.getId(), provider.getService()));
 
-            trim(service.getProperties());
+            final Properties serviceProperties = service.getProperties();
+
+            trim(serviceProperties);
 
             trim(provider.getProperties());
 
             logger.info("configureService.configuring", service.getId(), provider.getService(), provider.getId());
 
             if (logger.isDebugEnabled()) {
-                for (final Map.Entry<Object, Object> entry : service.getProperties().entrySet()) {
+                for (final Map.Entry<Object, Object> entry : serviceProperties.entrySet()) {
                     final Object key = entry.getKey();
                     Object value = entry.getValue();
 
@@ -1002,11 +1004,11 @@ public class ConfigurationFactory implem
             final Properties props = new SuperProperties();
 
             // weird hack but sometimes we don't want default values when we want null for instance
-            if (service.getProperties() == null || "false".equals(service.getProperties().getProperty(IGNORE_DEFAULT_VALUES_PROP, "false"))) {
+            if (serviceProperties == null || "false".equals(serviceProperties.getProperty(IGNORE_DEFAULT_VALUES_PROP, "false"))) {
                 props.putAll(provider.getProperties());
             }
 
-            props.putAll(service.getProperties());
+            props.putAll(serviceProperties);
             props.putAll(overrides);
 
             props.remove(IGNORE_DEFAULT_VALUES_PROP);
@@ -1048,6 +1050,19 @@ public class ConfigurationFactory implem
         }
     }
 
+    private static String getProviderType(org.apache.openejb.config.Service service) {
+
+        Class<?> clazz = service.getClass();
+
+        if (AbstractService.class.isAssignableFrom(clazz)) {
+            while (!clazz.getSuperclass().equals(AbstractService.class)) {
+                clazz = clazz.getSuperclass();
+            }
+        }
+
+        return clazz.getSimpleName();
+    }
+
     private static Properties trim(final Properties properties) {
         for (final Map.Entry<Object, Object> entry : properties.entrySet()) {
             final Object o = entry.getValue();
@@ -1078,7 +1093,7 @@ public class ConfigurationFactory implem
 
             final ServiceProvider provider = new ServiceProvider();
             provider.setId(service.getId());
-            provider.setService(service.getClass().getSimpleName());
+            provider.setService(getProviderType(service));
             provider.getTypes().add(service.getType());
             provider.setClassName(service.getClassName());
             provider.setConstructor(service.getConstructor());
@@ -1091,7 +1106,7 @@ public class ConfigurationFactory implem
         }
 
         if (service.getType() != null) {
-            return ServiceUtils.getServiceProviderByType(service.getClass().getSimpleName(), service.getType());
+            return ServiceUtils.getServiceProviderByType(getProviderType(service), service.getType());
         }
 
         if (service.getId() != null) {

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ActiveMQResourceAdapterBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ActiveMQResourceAdapterBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ActiveMQResourceAdapterBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ActiveMQResourceAdapterBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,116 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Resource;
+import org.apache.openejb.config.typed.util.Builders;
+import org.apache.openejb.util.Duration;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+@XmlRootElement(name = "ActiveMQResourceAdapter")
+public class ActiveMQResourceAdapterBuilder extends Resource {
+
+    private String brokerXmlConfig = "broker:(tcp://localhost:61616)?useJmx=false";
+    private java.net.URI serverUrl = java.net.URI.create("vm://localhost?waitForStart=20000&async=true");
+    private String dataSource = "Default Unmanaged JDBC Database";
+    private org.apache.openejb.util.Duration startupTimeout = org.apache.openejb.util.Duration.parse("10000");
+
+    public ActiveMQResourceAdapterBuilder() {
+        setClassName("org.apache.openejb.resource.activemq.ActiveMQResourceAdapter");
+        setType("ActiveMQResourceAdapter");
+        setId("ActiveMQResourceAdapter");
+
+    }
+
+    public ActiveMQResourceAdapterBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public ActiveMQResourceAdapterBuilder withBrokerXmlConfig(String brokerXmlConfig) {
+        this.brokerXmlConfig = brokerXmlConfig;
+        return this;
+    }
+
+    public void setBrokerXmlConfig(String brokerXmlConfig) {
+        this.brokerXmlConfig = brokerXmlConfig;
+    }
+
+    @XmlAttribute
+    public String getBrokerXmlConfig() {
+        return brokerXmlConfig;
+    }
+
+    public ActiveMQResourceAdapterBuilder withServerUrl(java.net.URI serverUrl) {
+        this.serverUrl = serverUrl;
+        return this;
+    }
+
+    public void setServerUrl(java.net.URI serverUrl) {
+        this.serverUrl = serverUrl;
+    }
+
+    @XmlAttribute
+    public java.net.URI getServerUrl() {
+        return serverUrl;
+    }
+
+    public ActiveMQResourceAdapterBuilder withDataSource(String dataSource) {
+        this.dataSource = dataSource;
+        return this;
+    }
+
+    public void setDataSource(String dataSource) {
+        this.dataSource = dataSource;
+    }
+
+    @XmlAttribute
+    public String getDataSource() {
+        return dataSource;
+    }
+
+    public ActiveMQResourceAdapterBuilder withStartupTimeout(org.apache.openejb.util.Duration startupTimeout) {
+        this.startupTimeout = startupTimeout;
+        return this;
+    }
+
+    public void setStartupTimeout(org.apache.openejb.util.Duration startupTimeout) {
+        this.startupTimeout = startupTimeout;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getStartupTimeout() {
+        return startupTimeout;
+    }
+
+    public ActiveMQResourceAdapterBuilder withStartupTimeout(long time, TimeUnit unit) {
+        return withStartupTimeout(new Duration(time, unit));
+    }
+
+    public void setStartupTimeout(long time, TimeUnit unit) {
+        setStartupTimeout(new Duration(time, unit));
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/BmpEntityContainerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/BmpEntityContainerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/BmpEntityContainerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/BmpEntityContainerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,63 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Container;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "BmpEntityContainer")
+public class BmpEntityContainerBuilder extends Container {
+
+    private int poolSize = 10;
+
+    public BmpEntityContainerBuilder() {
+        setClassName("org.apache.openejb.core.entity.EntityContainer");
+        setType("BMP_ENTITY");
+        setId("BmpEntityContainer");
+
+        setConstructor("id, securityService, PoolSize");
+
+    }
+
+    public BmpEntityContainerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public BmpEntityContainerBuilder withPoolSize(int poolSize) {
+        this.poolSize = poolSize;
+        return this;
+    }
+
+    public void setPoolSize(int poolSize) {
+        this.poolSize = poolSize;
+    }
+
+    @XmlAttribute
+    public int getPoolSize() {
+        return poolSize;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/CmpEntityContainerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/CmpEntityContainerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/CmpEntityContainerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/CmpEntityContainerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,63 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Container;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "CmpEntityContainer")
+public class CmpEntityContainerBuilder extends Container {
+
+    private String cmpEngineFactory = "org.apache.openejb.core.cmp.jpa.JpaCmpEngineFactory";
+
+    public CmpEntityContainerBuilder() {
+        setClassName("org.apache.openejb.core.cmp.CmpContainer");
+        setType("CMP_ENTITY");
+        setId("CmpEntityContainer");
+
+        setConstructor("id, transactionManager, securityService, CmpEngineFactory");
+
+    }
+
+    public CmpEntityContainerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public CmpEntityContainerBuilder withCmpEngineFactory(String cmpEngineFactory) {
+        this.cmpEngineFactory = cmpEngineFactory;
+        return this;
+    }
+
+    public void setCmpEngineFactory(String cmpEngineFactory) {
+        this.cmpEngineFactory = cmpEngineFactory;
+    }
+
+    @XmlAttribute
+    public String getCmpEngineFactory() {
+        return cmpEngineFactory;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/DataSourceBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/DataSourceBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/DataSourceBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/DataSourceBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,472 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Resource;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+@XmlRootElement(name = "DataSource")
+public class DataSourceBuilder extends Resource {
+
+    private String serviceId = null;
+    private String definition = null;
+    private boolean jtaManaged = true;
+    private String jdbcDriver = "org.hsqldb.jdbcDriver";
+    private java.net.URI jdbcUrl = java.net.URI.create("jdbc:hsqldb:mem:hsqldb");
+    private String userName = "sa";
+    private String password = null;
+    private String passwordCipher = "PlainText";
+    private String connectionProperties = null;
+    private boolean defaultAutoCommit = true;
+    private String defaultReadOnly = null;
+    private int initialSize = 0;
+    private int maxActive = 20;
+    private int maxIdle = 20;
+    private int minIdle = 0;
+    private int maxWait = -1;
+    private String validationQuery = null;
+    private boolean testOnBorrow = true;
+    private boolean testOnReturn = false;
+    private boolean testWhileIdle = false;
+    private long timeBetweenEvictionRunsMillis = -1;
+    private int numTestsPerEvictionRun = 3;
+    private long minEvictableIdleTimeMillis = 1800000;
+    private boolean poolPreparedStatements = false;
+    private int maxOpenPreparedStatements = 0;
+    private boolean accessToUnderlyingConnectionAllowed = false;
+    private boolean ignoreDefaultValues = false;
+
+    public DataSourceBuilder() {
+        setClassName("org.apache.openejb.resource.jdbc.DataSourceFactory");
+        setType("javax.sql.DataSource");
+        setId("DataSource");
+
+        setConstructor("serviceId, jtaManaged, jdbcDriver, definition");
+
+        setFactoryName("create");
+
+    }
+
+    public DataSourceBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public DataSourceBuilder withServiceId(String serviceId) {
+        this.serviceId = serviceId;
+        return this;
+    }
+
+    public void setServiceId(String serviceId) {
+        this.serviceId = serviceId;
+    }
+
+    @XmlAttribute
+    public String getServiceId() {
+        return serviceId;
+    }
+
+    public DataSourceBuilder withDefinition(String definition) {
+        this.definition = definition;
+        return this;
+    }
+
+    public void setDefinition(String definition) {
+        this.definition = definition;
+    }
+
+    @XmlAttribute
+    public String getDefinition() {
+        return definition;
+    }
+
+    public DataSourceBuilder withJtaManaged(boolean jtaManaged) {
+        this.jtaManaged = jtaManaged;
+        return this;
+    }
+
+    public void setJtaManaged(boolean jtaManaged) {
+        this.jtaManaged = jtaManaged;
+    }
+
+    @XmlAttribute
+    public boolean getJtaManaged() {
+        return jtaManaged;
+    }
+
+    public DataSourceBuilder withJdbcDriver(String jdbcDriver) {
+        this.jdbcDriver = jdbcDriver;
+        return this;
+    }
+
+    public void setJdbcDriver(String jdbcDriver) {
+        this.jdbcDriver = jdbcDriver;
+    }
+
+    @XmlAttribute
+    public String getJdbcDriver() {
+        return jdbcDriver;
+    }
+
+    public DataSourceBuilder withJdbcUrl(java.net.URI jdbcUrl) {
+        this.jdbcUrl = jdbcUrl;
+        return this;
+    }
+
+    public void setJdbcUrl(java.net.URI jdbcUrl) {
+        this.jdbcUrl = jdbcUrl;
+    }
+
+    @XmlAttribute
+    public java.net.URI getJdbcUrl() {
+        return jdbcUrl;
+    }
+
+    public DataSourceBuilder withUserName(String userName) {
+        this.userName = userName;
+        return this;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    @XmlAttribute
+    public String getUserName() {
+        return userName;
+    }
+
+    public DataSourceBuilder withPassword(String password) {
+        this.password = password;
+        return this;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    @XmlAttribute
+    public String getPassword() {
+        return password;
+    }
+
+    public DataSourceBuilder withPasswordCipher(String passwordCipher) {
+        this.passwordCipher = passwordCipher;
+        return this;
+    }
+
+    public void setPasswordCipher(String passwordCipher) {
+        this.passwordCipher = passwordCipher;
+    }
+
+    @XmlAttribute
+    public String getPasswordCipher() {
+        return passwordCipher;
+    }
+
+    public DataSourceBuilder withConnectionProperties(String connectionProperties) {
+        this.connectionProperties = connectionProperties;
+        return this;
+    }
+
+    public void setConnectionProperties(String connectionProperties) {
+        this.connectionProperties = connectionProperties;
+    }
+
+    @XmlAttribute
+    public String getConnectionProperties() {
+        return connectionProperties;
+    }
+
+    public DataSourceBuilder withDefaultAutoCommit(boolean defaultAutoCommit) {
+        this.defaultAutoCommit = defaultAutoCommit;
+        return this;
+    }
+
+    public void setDefaultAutoCommit(boolean defaultAutoCommit) {
+        this.defaultAutoCommit = defaultAutoCommit;
+    }
+
+    @XmlAttribute
+    public boolean getDefaultAutoCommit() {
+        return defaultAutoCommit;
+    }
+
+    public DataSourceBuilder withDefaultReadOnly(String defaultReadOnly) {
+        this.defaultReadOnly = defaultReadOnly;
+        return this;
+    }
+
+    public void setDefaultReadOnly(String defaultReadOnly) {
+        this.defaultReadOnly = defaultReadOnly;
+    }
+
+    @XmlAttribute
+    public String getDefaultReadOnly() {
+        return defaultReadOnly;
+    }
+
+    public DataSourceBuilder withInitialSize(int initialSize) {
+        this.initialSize = initialSize;
+        return this;
+    }
+
+    public void setInitialSize(int initialSize) {
+        this.initialSize = initialSize;
+    }
+
+    @XmlAttribute
+    public int getInitialSize() {
+        return initialSize;
+    }
+
+    public DataSourceBuilder withMaxActive(int maxActive) {
+        this.maxActive = maxActive;
+        return this;
+    }
+
+    public void setMaxActive(int maxActive) {
+        this.maxActive = maxActive;
+    }
+
+    @XmlAttribute
+    public int getMaxActive() {
+        return maxActive;
+    }
+
+    public DataSourceBuilder withMaxIdle(int maxIdle) {
+        this.maxIdle = maxIdle;
+        return this;
+    }
+
+    public void setMaxIdle(int maxIdle) {
+        this.maxIdle = maxIdle;
+    }
+
+    @XmlAttribute
+    public int getMaxIdle() {
+        return maxIdle;
+    }
+
+    public DataSourceBuilder withMinIdle(int minIdle) {
+        this.minIdle = minIdle;
+        return this;
+    }
+
+    public void setMinIdle(int minIdle) {
+        this.minIdle = minIdle;
+    }
+
+    @XmlAttribute
+    public int getMinIdle() {
+        return minIdle;
+    }
+
+    public DataSourceBuilder withMaxWait(int maxWait) {
+        this.maxWait = maxWait;
+        return this;
+    }
+
+    public void setMaxWait(int maxWait) {
+        this.maxWait = maxWait;
+    }
+
+    @XmlAttribute
+    public int getMaxWait() {
+        return maxWait;
+    }
+
+    public DataSourceBuilder withValidationQuery(String validationQuery) {
+        this.validationQuery = validationQuery;
+        return this;
+    }
+
+    public void setValidationQuery(String validationQuery) {
+        this.validationQuery = validationQuery;
+    }
+
+    @XmlAttribute
+    public String getValidationQuery() {
+        return validationQuery;
+    }
+
+    public DataSourceBuilder withTestOnBorrow(boolean testOnBorrow) {
+        this.testOnBorrow = testOnBorrow;
+        return this;
+    }
+
+    public void setTestOnBorrow(boolean testOnBorrow) {
+        this.testOnBorrow = testOnBorrow;
+    }
+
+    @XmlAttribute
+    public boolean getTestOnBorrow() {
+        return testOnBorrow;
+    }
+
+    public DataSourceBuilder withTestOnReturn(boolean testOnReturn) {
+        this.testOnReturn = testOnReturn;
+        return this;
+    }
+
+    public void setTestOnReturn(boolean testOnReturn) {
+        this.testOnReturn = testOnReturn;
+    }
+
+    @XmlAttribute
+    public boolean getTestOnReturn() {
+        return testOnReturn;
+    }
+
+    public DataSourceBuilder withTestWhileIdle(boolean testWhileIdle) {
+        this.testWhileIdle = testWhileIdle;
+        return this;
+    }
+
+    public void setTestWhileIdle(boolean testWhileIdle) {
+        this.testWhileIdle = testWhileIdle;
+    }
+
+    @XmlAttribute
+    public boolean getTestWhileIdle() {
+        return testWhileIdle;
+    }
+
+    public DataSourceBuilder withTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) {
+        this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
+        return this;
+    }
+
+    public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) {
+        this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
+    }
+
+    @XmlAttribute
+    public long getTimeBetweenEvictionRunsMillis() {
+        return timeBetweenEvictionRunsMillis;
+    }
+
+    public DataSourceBuilder withTimeBetweenEvictionRuns(long time, TimeUnit unit) {
+        return withTimeBetweenEvictionRunsMillis(TimeUnit.MILLISECONDS.convert(time, unit));
+    }
+
+    public void setTimeBetweenEvictionRuns(long time, TimeUnit unit) {
+        setTimeBetweenEvictionRunsMillis(TimeUnit.MILLISECONDS.convert(time, unit));
+    }
+
+    public DataSourceBuilder withNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
+        this.numTestsPerEvictionRun = numTestsPerEvictionRun;
+        return this;
+    }
+
+    public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
+        this.numTestsPerEvictionRun = numTestsPerEvictionRun;
+    }
+
+    @XmlAttribute
+    public int getNumTestsPerEvictionRun() {
+        return numTestsPerEvictionRun;
+    }
+
+    public DataSourceBuilder withMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) {
+        this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
+        return this;
+    }
+
+    public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) {
+        this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
+    }
+
+    @XmlAttribute
+    public long getMinEvictableIdleTimeMillis() {
+        return minEvictableIdleTimeMillis;
+    }
+
+    public DataSourceBuilder withMinEvictableIdleTime(long time, TimeUnit unit) {
+        return withMinEvictableIdleTimeMillis(TimeUnit.MILLISECONDS.convert(time, unit));
+    }
+
+    public void setMinEvictableIdleTime(long time, TimeUnit unit) {
+        setMinEvictableIdleTimeMillis(TimeUnit.MILLISECONDS.convert(time, unit));
+    }
+
+    public DataSourceBuilder withPoolPreparedStatements(boolean poolPreparedStatements) {
+        this.poolPreparedStatements = poolPreparedStatements;
+        return this;
+    }
+
+    public void setPoolPreparedStatements(boolean poolPreparedStatements) {
+        this.poolPreparedStatements = poolPreparedStatements;
+    }
+
+    @XmlAttribute
+    public boolean getPoolPreparedStatements() {
+        return poolPreparedStatements;
+    }
+
+    public DataSourceBuilder withMaxOpenPreparedStatements(int maxOpenPreparedStatements) {
+        this.maxOpenPreparedStatements = maxOpenPreparedStatements;
+        return this;
+    }
+
+    public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements) {
+        this.maxOpenPreparedStatements = maxOpenPreparedStatements;
+    }
+
+    @XmlAttribute
+    public int getMaxOpenPreparedStatements() {
+        return maxOpenPreparedStatements;
+    }
+
+    public DataSourceBuilder withAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed) {
+        this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed;
+        return this;
+    }
+
+    public void setAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed) {
+        this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed;
+    }
+
+    @XmlAttribute
+    public boolean getAccessToUnderlyingConnectionAllowed() {
+        return accessToUnderlyingConnectionAllowed;
+    }
+
+    public DataSourceBuilder withIgnoreDefaultValues(boolean ignoreDefaultValues) {
+        this.ignoreDefaultValues = ignoreDefaultValues;
+        return this;
+    }
+
+    public void setIgnoreDefaultValues(boolean ignoreDefaultValues) {
+        this.ignoreDefaultValues = ignoreDefaultValues;
+    }
+
+    @XmlAttribute
+    public boolean getIgnoreDefaultValues() {
+        return ignoreDefaultValues;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/InitialContextBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/InitialContextBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/InitialContextBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/InitialContextBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,45 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.JndiProvider;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "InitialContext")
+public class InitialContextBuilder extends JndiProvider {
+
+
+    public InitialContextBuilder() {
+        setClassName("org.apache.openejb.core.NoProvider");
+        setType("javax.naming.InitialContext");
+        setId("InitialContext");
+
+    }
+
+    public InitialContextBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JavaMailSessionBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JavaMailSessionBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JavaMailSessionBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JavaMailSessionBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,47 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Resource;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "JavaMailSession")
+public class JavaMailSessionBuilder extends Resource {
+
+
+    public JavaMailSessionBuilder() {
+        setClassName("org.apache.openejb.core.MailSessionFactory");
+        setType("javax.mail.Session");
+        setId("JavaMailSession");
+
+        setFactoryName("create");
+
+    }
+
+    public JavaMailSessionBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JmsConnectionFactoryBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JmsConnectionFactoryBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JmsConnectionFactoryBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/JmsConnectionFactoryBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,136 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Resource;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "JmsConnectionFactory")
+public class JmsConnectionFactoryBuilder extends Resource {
+
+    private String resourceAdapter = "Default JMS Resource Adapter";
+    private String transactionSupport = "xa";
+    private int poolMaxSize = 10;
+    private int poolMinSize = 0;
+    private int connectionMaxWaitMilliseconds = 5000;
+    private int connectionMaxIdleMinutes = 15;
+
+    public JmsConnectionFactoryBuilder() {
+        setClassName("org.apache.activemq.ra.ActiveMQManagedConnectionFactory");
+        setType("javax.jms.ConnectionFactory");
+        setId("JmsConnectionFactory");
+
+    }
+
+    public JmsConnectionFactoryBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public JmsConnectionFactoryBuilder withResourceAdapter(String resourceAdapter) {
+        this.resourceAdapter = resourceAdapter;
+        return this;
+    }
+
+    public void setResourceAdapter(String resourceAdapter) {
+        this.resourceAdapter = resourceAdapter;
+    }
+
+    @XmlAttribute
+    public String getResourceAdapter() {
+        return resourceAdapter;
+    }
+
+    public JmsConnectionFactoryBuilder withTransactionSupport(String transactionSupport) {
+        this.transactionSupport = transactionSupport;
+        return this;
+    }
+
+    public void setTransactionSupport(String transactionSupport) {
+        this.transactionSupport = transactionSupport;
+    }
+
+    @XmlAttribute
+    public String getTransactionSupport() {
+        return transactionSupport;
+    }
+
+    public JmsConnectionFactoryBuilder withPoolMaxSize(int poolMaxSize) {
+        this.poolMaxSize = poolMaxSize;
+        return this;
+    }
+
+    public void setPoolMaxSize(int poolMaxSize) {
+        this.poolMaxSize = poolMaxSize;
+    }
+
+    @XmlAttribute
+    public int getPoolMaxSize() {
+        return poolMaxSize;
+    }
+
+    public JmsConnectionFactoryBuilder withPoolMinSize(int poolMinSize) {
+        this.poolMinSize = poolMinSize;
+        return this;
+    }
+
+    public void setPoolMinSize(int poolMinSize) {
+        this.poolMinSize = poolMinSize;
+    }
+
+    @XmlAttribute
+    public int getPoolMinSize() {
+        return poolMinSize;
+    }
+
+    public JmsConnectionFactoryBuilder withConnectionMaxWaitMilliseconds(int connectionMaxWaitMilliseconds) {
+        this.connectionMaxWaitMilliseconds = connectionMaxWaitMilliseconds;
+        return this;
+    }
+
+    public void setConnectionMaxWaitMilliseconds(int connectionMaxWaitMilliseconds) {
+        this.connectionMaxWaitMilliseconds = connectionMaxWaitMilliseconds;
+    }
+
+    @XmlAttribute
+    public int getConnectionMaxWaitMilliseconds() {
+        return connectionMaxWaitMilliseconds;
+    }
+
+    public JmsConnectionFactoryBuilder withConnectionMaxIdleMinutes(int connectionMaxIdleMinutes) {
+        this.connectionMaxIdleMinutes = connectionMaxIdleMinutes;
+        return this;
+    }
+
+    public void setConnectionMaxIdleMinutes(int connectionMaxIdleMinutes) {
+        this.connectionMaxIdleMinutes = connectionMaxIdleMinutes;
+    }
+
+    @XmlAttribute
+    public int getConnectionMaxIdleMinutes() {
+        return connectionMaxIdleMinutes;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ManagedContainerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ManagedContainerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ManagedContainerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ManagedContainerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,47 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Container;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "ManagedContainer")
+public class ManagedContainerBuilder extends Container {
+
+
+    public ManagedContainerBuilder() {
+        setClassName("org.apache.openejb.core.managed.ManagedContainer");
+        setType("MANAGED");
+        setId("ManagedContainer");
+
+        setConstructor("id, securityService");
+
+    }
+
+    public ManagedContainerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/MessageDrivenContainerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/MessageDrivenContainerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/MessageDrivenContainerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/MessageDrivenContainerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,108 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Container;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "MessageDrivenContainer")
+public class MessageDrivenContainerBuilder extends Container {
+
+    private String resourceAdapter = "Default JMS Resource Adapter";
+    private String messageListenerInterface = "javax.jms.MessageListener";
+    private String activationSpecClass = "org.apache.activemq.ra.ActiveMQActivationSpec";
+    private int instanceLimit = 10;
+
+    public MessageDrivenContainerBuilder() {
+        setClassName("org.apache.openejb.core.mdb.MdbContainer");
+        setType("MESSAGE");
+        setId("MessageDrivenContainer");
+
+        setConstructor("id, securityService, ResourceAdapter, MessageListenerInterface, ActivationSpecClass, InstanceLimit");
+
+    }
+
+    public MessageDrivenContainerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public MessageDrivenContainerBuilder withResourceAdapter(String resourceAdapter) {
+        this.resourceAdapter = resourceAdapter;
+        return this;
+    }
+
+    public void setResourceAdapter(String resourceAdapter) {
+        this.resourceAdapter = resourceAdapter;
+    }
+
+    @XmlAttribute
+    public String getResourceAdapter() {
+        return resourceAdapter;
+    }
+
+    public MessageDrivenContainerBuilder withMessageListenerInterface(String messageListenerInterface) {
+        this.messageListenerInterface = messageListenerInterface;
+        return this;
+    }
+
+    public void setMessageListenerInterface(String messageListenerInterface) {
+        this.messageListenerInterface = messageListenerInterface;
+    }
+
+    @XmlAttribute
+    public String getMessageListenerInterface() {
+        return messageListenerInterface;
+    }
+
+    public MessageDrivenContainerBuilder withActivationSpecClass(String activationSpecClass) {
+        this.activationSpecClass = activationSpecClass;
+        return this;
+    }
+
+    public void setActivationSpecClass(String activationSpecClass) {
+        this.activationSpecClass = activationSpecClass;
+    }
+
+    @XmlAttribute
+    public String getActivationSpecClass() {
+        return activationSpecClass;
+    }
+
+    public MessageDrivenContainerBuilder withInstanceLimit(int instanceLimit) {
+        this.instanceLimit = instanceLimit;
+        return this;
+    }
+
+    public void setInstanceLimit(int instanceLimit) {
+        this.instanceLimit = instanceLimit;
+    }
+
+    @XmlAttribute
+    public int getInstanceLimit() {
+        return instanceLimit;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ORBBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ORBBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ORBBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ORBBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,47 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Resource;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "ORB")
+public class ORBBuilder extends Resource {
+
+
+    public ORBBuilder() {
+        setClassName("org.apache.openejb.core.OrbFactory");
+        setType("org.omg.CORBA.ORB");
+        setId("ORB");
+
+        setFactoryName("create");
+
+    }
+
+    public ORBBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ProxyFactoryBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ProxyFactoryBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ProxyFactoryBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/ProxyFactoryBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,45 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.ProxyFactory;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "ProxyFactory")
+public class ProxyFactoryBuilder extends ProxyFactory {
+
+
+    public ProxyFactoryBuilder() {
+        setClassName("org.apache.openejb.util.proxy.Jdk13ProxyFactory");
+        setType("ProxyFactory");
+        setId("ProxyFactory");
+
+    }
+
+    public ProxyFactoryBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/QueueBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/QueueBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/QueueBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/QueueBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,63 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Resource;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "Queue")
+public class QueueBuilder extends Resource {
+
+    private String destination = null;
+
+    public QueueBuilder() {
+        setClassName("org.apache.activemq.command.ActiveMQQueue");
+        setType("javax.jms.Queue");
+        setId("Queue");
+
+        setConstructor("destination");
+
+    }
+
+    public QueueBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public QueueBuilder withDestination(String destination) {
+        this.destination = destination;
+        return this;
+    }
+
+    public void setDestination(String destination) {
+        this.destination = destination;
+    }
+
+    @XmlAttribute
+    public String getDestination() {
+        return destination;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SecurityServiceBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SecurityServiceBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SecurityServiceBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SecurityServiceBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,61 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.SecurityService;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "SecurityService")
+public class SecurityServiceBuilder extends SecurityService {
+
+    private String defaultUser = "guest         ";
+
+    public SecurityServiceBuilder() {
+        setClassName("org.apache.openejb.core.security.SecurityServiceImpl");
+        setType("SecurityService");
+        setId("SecurityService");
+
+    }
+
+    public SecurityServiceBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public SecurityServiceBuilder withDefaultUser(String defaultUser) {
+        this.defaultUser = defaultUser;
+        return this;
+    }
+
+    public void setDefaultUser(String defaultUser) {
+        this.defaultUser = defaultUser;
+    }
+
+    @XmlAttribute
+    public String getDefaultUser() {
+        return defaultUser;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SingletonContainerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SingletonContainerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SingletonContainerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/SingletonContainerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,73 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Container;
+import org.apache.openejb.config.typed.util.Builders;
+import org.apache.openejb.util.Duration;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+@XmlRootElement(name = "SingletonContainer")
+public class SingletonContainerBuilder extends Container {
+
+    private org.apache.openejb.util.Duration accessTimeout = org.apache.openejb.util.Duration.parse("30 seconds");
+
+    public SingletonContainerBuilder() {
+        setClassName("org.apache.openejb.core.singleton.SingletonContainer");
+        setType("SINGLETON");
+        setId("SingletonContainer");
+
+        setConstructor("id, securityService");
+
+    }
+
+    public SingletonContainerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public SingletonContainerBuilder withAccessTimeout(org.apache.openejb.util.Duration accessTimeout) {
+        this.accessTimeout = accessTimeout;
+        return this;
+    }
+
+    public void setAccessTimeout(org.apache.openejb.util.Duration accessTimeout) {
+        this.accessTimeout = accessTimeout;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getAccessTimeout() {
+        return accessTimeout;
+    }
+
+    public SingletonContainerBuilder withAccessTimeout(long time, TimeUnit unit) {
+        return withAccessTimeout(new Duration(time, unit));
+    }
+
+    public void setAccessTimeout(long time, TimeUnit unit) {
+        setAccessTimeout(new Duration(time, unit));
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatefulContainerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatefulContainerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatefulContainerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatefulContainerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,171 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Container;
+import org.apache.openejb.config.typed.util.Builders;
+import org.apache.openejb.util.Duration;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+@XmlRootElement(name = "StatefulContainer")
+public class StatefulContainerBuilder extends Container {
+
+    private org.apache.openejb.util.Duration accessTimeout = org.apache.openejb.util.Duration.parse("30 seconds");
+    private String cache = "org.apache.openejb.core.stateful.SimpleCache";
+    private String passivator = "org.apache.openejb.core.stateful.SimplePassivater";
+    private org.apache.openejb.util.Duration timeOut = org.apache.openejb.util.Duration.parse("20");
+    private int frequency = 60;
+    private int capacity = 1000;
+    private int bulkPassivate = 100;
+
+    public StatefulContainerBuilder() {
+        setClassName("org.apache.openejb.core.stateful.StatefulContainerFactory");
+        setType("STATEFUL");
+        setId("StatefulContainer");
+
+        setFactoryName("create");
+
+    }
+
+    public StatefulContainerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public StatefulContainerBuilder withAccessTimeout(org.apache.openejb.util.Duration accessTimeout) {
+        this.accessTimeout = accessTimeout;
+        return this;
+    }
+
+    public void setAccessTimeout(org.apache.openejb.util.Duration accessTimeout) {
+        this.accessTimeout = accessTimeout;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getAccessTimeout() {
+        return accessTimeout;
+    }
+
+    public StatefulContainerBuilder withAccessTimeout(long time, TimeUnit unit) {
+        return withAccessTimeout(new Duration(time, unit));
+    }
+
+    public void setAccessTimeout(long time, TimeUnit unit) {
+        setAccessTimeout(new Duration(time, unit));
+    }
+
+    public StatefulContainerBuilder withCache(String cache) {
+        this.cache = cache;
+        return this;
+    }
+
+    public void setCache(String cache) {
+        this.cache = cache;
+    }
+
+    @XmlAttribute
+    public String getCache() {
+        return cache;
+    }
+
+    public StatefulContainerBuilder withPassivator(String passivator) {
+        this.passivator = passivator;
+        return this;
+    }
+
+    public void setPassivator(String passivator) {
+        this.passivator = passivator;
+    }
+
+    @XmlAttribute
+    public String getPassivator() {
+        return passivator;
+    }
+
+    public StatefulContainerBuilder withTimeOut(org.apache.openejb.util.Duration timeOut) {
+        this.timeOut = timeOut;
+        return this;
+    }
+
+    public void setTimeOut(org.apache.openejb.util.Duration timeOut) {
+        this.timeOut = timeOut;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getTimeOut() {
+        return timeOut;
+    }
+
+    public StatefulContainerBuilder withTimeOut(long time, TimeUnit unit) {
+        return withTimeOut(new Duration(time, unit));
+    }
+
+    public void setTimeOut(long time, TimeUnit unit) {
+        setTimeOut(new Duration(time, unit));
+    }
+
+    public StatefulContainerBuilder withFrequency(int frequency) {
+        this.frequency = frequency;
+        return this;
+    }
+
+    public void setFrequency(int frequency) {
+        this.frequency = frequency;
+    }
+
+    @XmlAttribute
+    public int getFrequency() {
+        return frequency;
+    }
+
+    public StatefulContainerBuilder withCapacity(int capacity) {
+        this.capacity = capacity;
+        return this;
+    }
+
+    public void setCapacity(int capacity) {
+        this.capacity = capacity;
+    }
+
+    @XmlAttribute
+    public int getCapacity() {
+        return capacity;
+    }
+
+    public StatefulContainerBuilder withBulkPassivate(int bulkPassivate) {
+        this.bulkPassivate = bulkPassivate;
+        return this;
+    }
+
+    public void setBulkPassivate(int bulkPassivate) {
+        this.bulkPassivate = bulkPassivate;
+    }
+
+    @XmlAttribute
+    public int getBulkPassivate() {
+        return bulkPassivate;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatelessContainerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatelessContainerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatelessContainerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/StatelessContainerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,285 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Container;
+import org.apache.openejb.config.typed.util.Builders;
+import org.apache.openejb.util.Duration;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+@XmlRootElement(name = "StatelessContainer")
+public class StatelessContainerBuilder extends Container {
+
+    private org.apache.openejb.util.Duration accessTimeout = org.apache.openejb.util.Duration.parse("30 seconds");
+    private int maxSize = 10;
+    private int minSize = 0;
+    private boolean strictPooling = true;
+    private org.apache.openejb.util.Duration maxAge = org.apache.openejb.util.Duration.parse("0 hours");
+    private boolean replaceAged = true;
+    private boolean replaceFlushed = false;
+    private int maxAgeOffset = -1;
+    private org.apache.openejb.util.Duration idleTimeout = org.apache.openejb.util.Duration.parse("0 minutes");
+    private boolean garbageCollection = false;
+    private org.apache.openejb.util.Duration sweepInterval = org.apache.openejb.util.Duration.parse("5 minutes");
+    private int callbackThreads = 5;
+    private org.apache.openejb.util.Duration closeTimeout = org.apache.openejb.util.Duration.parse("5 minutes");
+
+    public StatelessContainerBuilder() {
+        setClassName("org.apache.openejb.core.stateless.StatelessContainerFactory");
+        setType("STATELESS");
+        setId("StatelessContainer");
+
+        setFactoryName("create");
+
+    }
+
+    public StatelessContainerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public StatelessContainerBuilder withAccessTimeout(org.apache.openejb.util.Duration accessTimeout) {
+        this.accessTimeout = accessTimeout;
+        return this;
+    }
+
+    public void setAccessTimeout(org.apache.openejb.util.Duration accessTimeout) {
+        this.accessTimeout = accessTimeout;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getAccessTimeout() {
+        return accessTimeout;
+    }
+
+    public StatelessContainerBuilder withAccessTimeout(long time, TimeUnit unit) {
+        return withAccessTimeout(new Duration(time, unit));
+    }
+
+    public void setAccessTimeout(long time, TimeUnit unit) {
+        setAccessTimeout(new Duration(time, unit));
+    }
+
+    public StatelessContainerBuilder withMaxSize(int maxSize) {
+        this.maxSize = maxSize;
+        return this;
+    }
+
+    public void setMaxSize(int maxSize) {
+        this.maxSize = maxSize;
+    }
+
+    @XmlAttribute
+    public int getMaxSize() {
+        return maxSize;
+    }
+
+    public StatelessContainerBuilder withMinSize(int minSize) {
+        this.minSize = minSize;
+        return this;
+    }
+
+    public void setMinSize(int minSize) {
+        this.minSize = minSize;
+    }
+
+    @XmlAttribute
+    public int getMinSize() {
+        return minSize;
+    }
+
+    public StatelessContainerBuilder withStrictPooling(boolean strictPooling) {
+        this.strictPooling = strictPooling;
+        return this;
+    }
+
+    public void setStrictPooling(boolean strictPooling) {
+        this.strictPooling = strictPooling;
+    }
+
+    @XmlAttribute
+    public boolean getStrictPooling() {
+        return strictPooling;
+    }
+
+    public StatelessContainerBuilder withMaxAge(org.apache.openejb.util.Duration maxAge) {
+        this.maxAge = maxAge;
+        return this;
+    }
+
+    public void setMaxAge(org.apache.openejb.util.Duration maxAge) {
+        this.maxAge = maxAge;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getMaxAge() {
+        return maxAge;
+    }
+
+    public StatelessContainerBuilder withMaxAge(long time, TimeUnit unit) {
+        return withMaxAge(new Duration(time, unit));
+    }
+
+    public void setMaxAge(long time, TimeUnit unit) {
+        setMaxAge(new Duration(time, unit));
+    }
+
+    public StatelessContainerBuilder withReplaceAged(boolean replaceAged) {
+        this.replaceAged = replaceAged;
+        return this;
+    }
+
+    public void setReplaceAged(boolean replaceAged) {
+        this.replaceAged = replaceAged;
+    }
+
+    @XmlAttribute
+    public boolean getReplaceAged() {
+        return replaceAged;
+    }
+
+    public StatelessContainerBuilder withReplaceFlushed(boolean replaceFlushed) {
+        this.replaceFlushed = replaceFlushed;
+        return this;
+    }
+
+    public void setReplaceFlushed(boolean replaceFlushed) {
+        this.replaceFlushed = replaceFlushed;
+    }
+
+    @XmlAttribute
+    public boolean getReplaceFlushed() {
+        return replaceFlushed;
+    }
+
+    public StatelessContainerBuilder withMaxAgeOffset(int maxAgeOffset) {
+        this.maxAgeOffset = maxAgeOffset;
+        return this;
+    }
+
+    public void setMaxAgeOffset(int maxAgeOffset) {
+        this.maxAgeOffset = maxAgeOffset;
+    }
+
+    @XmlAttribute
+    public int getMaxAgeOffset() {
+        return maxAgeOffset;
+    }
+
+    public StatelessContainerBuilder withIdleTimeout(org.apache.openejb.util.Duration idleTimeout) {
+        this.idleTimeout = idleTimeout;
+        return this;
+    }
+
+    public void setIdleTimeout(org.apache.openejb.util.Duration idleTimeout) {
+        this.idleTimeout = idleTimeout;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getIdleTimeout() {
+        return idleTimeout;
+    }
+
+    public StatelessContainerBuilder withIdleTimeout(long time, TimeUnit unit) {
+        return withIdleTimeout(new Duration(time, unit));
+    }
+
+    public void setIdleTimeout(long time, TimeUnit unit) {
+        setIdleTimeout(new Duration(time, unit));
+    }
+
+    public StatelessContainerBuilder withGarbageCollection(boolean garbageCollection) {
+        this.garbageCollection = garbageCollection;
+        return this;
+    }
+
+    public void setGarbageCollection(boolean garbageCollection) {
+        this.garbageCollection = garbageCollection;
+    }
+
+    @XmlAttribute
+    public boolean getGarbageCollection() {
+        return garbageCollection;
+    }
+
+    public StatelessContainerBuilder withSweepInterval(org.apache.openejb.util.Duration sweepInterval) {
+        this.sweepInterval = sweepInterval;
+        return this;
+    }
+
+    public void setSweepInterval(org.apache.openejb.util.Duration sweepInterval) {
+        this.sweepInterval = sweepInterval;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getSweepInterval() {
+        return sweepInterval;
+    }
+
+    public StatelessContainerBuilder withSweepInterval(long time, TimeUnit unit) {
+        return withSweepInterval(new Duration(time, unit));
+    }
+
+    public void setSweepInterval(long time, TimeUnit unit) {
+        setSweepInterval(new Duration(time, unit));
+    }
+
+    public StatelessContainerBuilder withCallbackThreads(int callbackThreads) {
+        this.callbackThreads = callbackThreads;
+        return this;
+    }
+
+    public void setCallbackThreads(int callbackThreads) {
+        this.callbackThreads = callbackThreads;
+    }
+
+    @XmlAttribute
+    public int getCallbackThreads() {
+        return callbackThreads;
+    }
+
+    public StatelessContainerBuilder withCloseTimeout(org.apache.openejb.util.Duration closeTimeout) {
+        this.closeTimeout = closeTimeout;
+        return this;
+    }
+
+    public void setCloseTimeout(org.apache.openejb.util.Duration closeTimeout) {
+        this.closeTimeout = closeTimeout;
+    }
+
+    @XmlAttribute
+    public org.apache.openejb.util.Duration getCloseTimeout() {
+        return closeTimeout;
+    }
+
+    public StatelessContainerBuilder withCloseTimeout(long time, TimeUnit unit) {
+        return withCloseTimeout(new Duration(time, unit));
+    }
+
+    public void setCloseTimeout(long time, TimeUnit unit) {
+        setCloseTimeout(new Duration(time, unit));
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TopicBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TopicBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TopicBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TopicBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,63 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.Resource;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+
+@XmlRootElement(name = "Topic")
+public class TopicBuilder extends Resource {
+
+    private String destination = null;
+
+    public TopicBuilder() {
+        setClassName("org.apache.activemq.command.ActiveMQTopic");
+        setType("javax.jms.Topic");
+        setId("Topic");
+
+        setConstructor("destination");
+
+    }
+
+    public TopicBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public TopicBuilder withDestination(String destination) {
+        this.destination = destination;
+        return this;
+    }
+
+    public void setDestination(String destination) {
+        this.destination = destination;
+    }
+
+    @XmlAttribute
+    public String getDestination() {
+        return destination;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}

Added: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TransactionManagerBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TransactionManagerBuilder.java?rev=1377576&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TransactionManagerBuilder.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/typed/TransactionManagerBuilder.java Mon Aug 27 06:23:40 2012
@@ -0,0 +1,277 @@
+/*
+ * 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.config.typed;
+
+import org.apache.openejb.config.sys.TransactionManager;
+import org.apache.openejb.config.typed.util.Builders;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+@XmlRootElement(name = "TransactionManager")
+public class TransactionManagerBuilder extends TransactionManager {
+
+    private long defaultTransactionTimeoutSeconds = 600;
+    private boolean txRecovery = false;
+    private int bufferSizeKb = 32;
+    private boolean checksumEnabled = true;
+    private boolean adler32Checksum = true;
+    private long flushSleepTimeMilliseconds = 50;
+    private String logFileDir = "txlog";
+    private String logFileExt = "log";
+    private String logFileName = "howl";
+    private int maxBlocksPerFile = -1;
+    private int maxBuffers = 0;
+    private int maxLogFiles = 2;
+    private int minBuffers = 4;
+    private int threadsWaitingForceThreshold = -1;
+
+    public TransactionManagerBuilder() {
+        setClassName("org.apache.openejb.resource.GeronimoTransactionManagerFactory");
+        setType("TransactionManager");
+        setId("TransactionManager");
+
+        setConstructor("defaultTransactionTimeoutSeconds, TxRecovery, tmId, bufferClassName, bufferSizeKb, checksumEnabled, adler32Checksum, flushSleepTimeMilliseconds, logFileDir, logFileExt, logFileName, maxBlocksPerFile, maxBuffers, maxLogFiles, minBuffers, threadsWaitingForceThreshold");
+
+        setFactoryName("create");
+
+    }
+
+    public TransactionManagerBuilder id(String id) {
+        setId(id);
+        return this;
+    }
+
+    public TransactionManagerBuilder withDefaultTransactionTimeoutSeconds(long defaultTransactionTimeoutSeconds) {
+        this.defaultTransactionTimeoutSeconds = defaultTransactionTimeoutSeconds;
+        return this;
+    }
+
+    public void setDefaultTransactionTimeoutSeconds(long defaultTransactionTimeoutSeconds) {
+        this.defaultTransactionTimeoutSeconds = defaultTransactionTimeoutSeconds;
+    }
+
+    @XmlAttribute
+    public long getDefaultTransactionTimeoutSeconds() {
+        return defaultTransactionTimeoutSeconds;
+    }
+
+    public TransactionManagerBuilder withDefaultTransactionTimeout(long time, TimeUnit unit) {
+        return withDefaultTransactionTimeoutSeconds(TimeUnit.SECONDS.convert(time, unit));
+    }
+
+    public void setDefaultTransactionTimeout(long time, TimeUnit unit) {
+        setDefaultTransactionTimeoutSeconds(TimeUnit.SECONDS.convert(time, unit));
+    }
+
+    public TransactionManagerBuilder withTxRecovery(boolean txRecovery) {
+        this.txRecovery = txRecovery;
+        return this;
+    }
+
+    public void setTxRecovery(boolean txRecovery) {
+        this.txRecovery = txRecovery;
+    }
+
+    @XmlAttribute
+    public boolean getTxRecovery() {
+        return txRecovery;
+    }
+
+    public TransactionManagerBuilder withBufferSizeKb(int bufferSizeKb) {
+        this.bufferSizeKb = bufferSizeKb;
+        return this;
+    }
+
+    public void setBufferSizeKb(int bufferSizeKb) {
+        this.bufferSizeKb = bufferSizeKb;
+    }
+
+    @XmlAttribute
+    public int getBufferSizeKb() {
+        return bufferSizeKb;
+    }
+
+    public TransactionManagerBuilder withChecksumEnabled(boolean checksumEnabled) {
+        this.checksumEnabled = checksumEnabled;
+        return this;
+    }
+
+    public void setChecksumEnabled(boolean checksumEnabled) {
+        this.checksumEnabled = checksumEnabled;
+    }
+
+    @XmlAttribute
+    public boolean getChecksumEnabled() {
+        return checksumEnabled;
+    }
+
+    public TransactionManagerBuilder withAdler32Checksum(boolean adler32Checksum) {
+        this.adler32Checksum = adler32Checksum;
+        return this;
+    }
+
+    public void setAdler32Checksum(boolean adler32Checksum) {
+        this.adler32Checksum = adler32Checksum;
+    }
+
+    @XmlAttribute
+    public boolean getAdler32Checksum() {
+        return adler32Checksum;
+    }
+
+    public TransactionManagerBuilder withFlushSleepTimeMilliseconds(long flushSleepTimeMilliseconds) {
+        this.flushSleepTimeMilliseconds = flushSleepTimeMilliseconds;
+        return this;
+    }
+
+    public void setFlushSleepTimeMilliseconds(long flushSleepTimeMilliseconds) {
+        this.flushSleepTimeMilliseconds = flushSleepTimeMilliseconds;
+    }
+
+    @XmlAttribute
+    public long getFlushSleepTimeMilliseconds() {
+        return flushSleepTimeMilliseconds;
+    }
+
+    public TransactionManagerBuilder withFlushSleepTime(long time, TimeUnit unit) {
+        return withFlushSleepTimeMilliseconds(TimeUnit.MILLISECONDS.convert(time, unit));
+    }
+
+    public void setFlushSleepTime(long time, TimeUnit unit) {
+        setFlushSleepTimeMilliseconds(TimeUnit.MILLISECONDS.convert(time, unit));
+    }
+
+    public TransactionManagerBuilder withLogFileDir(String logFileDir) {
+        this.logFileDir = logFileDir;
+        return this;
+    }
+
+    public void setLogFileDir(String logFileDir) {
+        this.logFileDir = logFileDir;
+    }
+
+    @XmlAttribute
+    public String getLogFileDir() {
+        return logFileDir;
+    }
+
+    public TransactionManagerBuilder withLogFileExt(String logFileExt) {
+        this.logFileExt = logFileExt;
+        return this;
+    }
+
+    public void setLogFileExt(String logFileExt) {
+        this.logFileExt = logFileExt;
+    }
+
+    @XmlAttribute
+    public String getLogFileExt() {
+        return logFileExt;
+    }
+
+    public TransactionManagerBuilder withLogFileName(String logFileName) {
+        this.logFileName = logFileName;
+        return this;
+    }
+
+    public void setLogFileName(String logFileName) {
+        this.logFileName = logFileName;
+    }
+
+    @XmlAttribute
+    public String getLogFileName() {
+        return logFileName;
+    }
+
+    public TransactionManagerBuilder withMaxBlocksPerFile(int maxBlocksPerFile) {
+        this.maxBlocksPerFile = maxBlocksPerFile;
+        return this;
+    }
+
+    public void setMaxBlocksPerFile(int maxBlocksPerFile) {
+        this.maxBlocksPerFile = maxBlocksPerFile;
+    }
+
+    @XmlAttribute
+    public int getMaxBlocksPerFile() {
+        return maxBlocksPerFile;
+    }
+
+    public TransactionManagerBuilder withMaxBuffers(int maxBuffers) {
+        this.maxBuffers = maxBuffers;
+        return this;
+    }
+
+    public void setMaxBuffers(int maxBuffers) {
+        this.maxBuffers = maxBuffers;
+    }
+
+    @XmlAttribute
+    public int getMaxBuffers() {
+        return maxBuffers;
+    }
+
+    public TransactionManagerBuilder withMaxLogFiles(int maxLogFiles) {
+        this.maxLogFiles = maxLogFiles;
+        return this;
+    }
+
+    public void setMaxLogFiles(int maxLogFiles) {
+        this.maxLogFiles = maxLogFiles;
+    }
+
+    @XmlAttribute
+    public int getMaxLogFiles() {
+        return maxLogFiles;
+    }
+
+    public TransactionManagerBuilder withMinBuffers(int minBuffers) {
+        this.minBuffers = minBuffers;
+        return this;
+    }
+
+    public void setMinBuffers(int minBuffers) {
+        this.minBuffers = minBuffers;
+    }
+
+    @XmlAttribute
+    public int getMinBuffers() {
+        return minBuffers;
+    }
+
+    public TransactionManagerBuilder withThreadsWaitingForceThreshold(int threadsWaitingForceThreshold) {
+        this.threadsWaitingForceThreshold = threadsWaitingForceThreshold;
+        return this;
+    }
+
+    public void setThreadsWaitingForceThreshold(int threadsWaitingForceThreshold) {
+        this.threadsWaitingForceThreshold = threadsWaitingForceThreshold;
+    }
+
+    @XmlAttribute
+    public int getThreadsWaitingForceThreshold() {
+        return threadsWaitingForceThreshold;
+    }
+
+    public Properties getProperties() {
+        return Builders.getProperties(this);
+    }
+
+}