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 2011/09/27 20:46:39 UTC

svn commit: r1176518 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Resources.java

Author: dblevins
Date: Tue Sep 27 18:46:39 2011
New Revision: 1176518

URL: http://svn.apache.org/viewvc?rev=1176518&view=rev
Log:
replacement for openejb.xml in apps

Added:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Resources.java
      - copied, changed from r1176501, openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Openejb.java

Copied: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Resources.java (from r1176501, openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Openejb.java)
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Resources.java?p2=openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Resources.java&p1=openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Openejb.java&r1=1176501&r2=1176518&rev=1176518&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Openejb.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/sys/Resources.java Tue Sep 27 18:46:39 2011
@@ -37,13 +37,9 @@ import java.util.List;
  *       <sequence>
  *         <element ref="{http://www.openejb.org/System/Configuration}Container" maxOccurs="unbounded"/>
  *         <element ref="{http://www.openejb.org/System/Configuration}JndiProvider" maxOccurs="unbounded" minOccurs="0"/>
- *         <element ref="{http://www.openejb.org/System/Configuration}SecurityService" minOccurs="0"/>
- *         <element ref="{http://www.openejb.org/System/Configuration}TransactionManager" minOccurs="0"/>
  *         <element ref="{http://www.openejb.org/System/Configuration}ConnectionManager" minOccurs="0"/>
- *         <element ref="{http://www.openejb.org/System/Configuration}ProxyFactory" minOccurs="0"/>
  *         <element ref="{http://www.openejb.org/System/Configuration}Connector" maxOccurs="unbounded" minOccurs="0"/>
  *         <element ref="{http://www.openejb.org/System/Configuration}Resource" maxOccurs="unbounded" minOccurs="0"/>
- *         <element ref="{http://www.openejb.org/System/Configuration}Deployments" maxOccurs="unbounded" minOccurs="0"/>
  *       </sequence>
  *     </restriction>
  *   </complexContent>
@@ -51,28 +47,21 @@ import java.util.List;
  * </pre>
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {"container", "jndiProvider", "securityService", "transactionManager", "connectionManager", "proxyFactory", "connector", "resource", "deployments"})
-@XmlRootElement(name = "openejb")
-public class Openejb {
+@XmlType(name = "", propOrder = {"container", "jndiProvider", "connectionManager", "resource"})
+@XmlRootElement(name = "resources")
+public class Resources {
 
     @XmlElement(name = "Container", required = true)
     protected List<Container> container;
+
     @XmlElement(name = "JndiProvider")
     protected List<JndiProvider> jndiProvider;
-    @XmlElement(name = "SecurityService")
-    protected SecurityService securityService;
-    @XmlElement(name = "TransactionManager")
-    protected TransactionManager transactionManager;
+
     @XmlElement(name = "ConnectionManager")
     protected ConnectionManager connectionManager;
-    @XmlElement(name = "ProxyFactory")
-    protected ProxyFactory proxyFactory;
-    @XmlElement(name = "Connector")
-    protected List<Connector> connector;
+
     @XmlElement(name = "Resource")
     protected List<Resource> resource;
-    @XmlElement(name = "Deployments")
-    protected List<Deployments> deployments;
 
     /**
      * Gets the value of the container property.
@@ -92,7 +81,7 @@ public class Openejb {
      * <p/>
      * <p/>
      * Objects of the following type(s) are allowed in the list
-     * {@link Container }
+     * {@link org.apache.openejb.config.sys.Container }
      */
     public List<Container> getContainer() {
         if (container == null) {
@@ -119,7 +108,7 @@ public class Openejb {
      * <p/>
      * <p/>
      * Objects of the following type(s) are allowed in the list
-     * {@link JndiProvider }
+     * {@link org.apache.openejb.config.sys.JndiProvider }
      */
     public List<JndiProvider> getJndiProvider() {
         if (jndiProvider == null) {
@@ -129,50 +118,10 @@ public class Openejb {
     }
 
     /**
-     * Gets the value of the securityService property.
-     *
-     * @return possible object is
-     *         {@link SecurityService }
-     */
-    public SecurityService getSecurityService() {
-        return securityService;
-    }
-
-    /**
-     * Sets the value of the securityService property.
-     *
-     * @param value allowed object is
-     *              {@link SecurityService }
-     */
-    public void setSecurityService(SecurityService value) {
-        this.securityService = value;
-    }
-
-    /**
-     * Gets the value of the transactionManager property.
-     *
-     * @return possible object is
-     *         {@link TransactionManager }
-     */
-    public TransactionManager getTransactionManager() {
-        return transactionManager;
-    }
-
-    /**
-     * Sets the value of the transactionManager property.
-     *
-     * @param value allowed object is
-     *              {@link TransactionManager }
-     */
-    public void setTransactionManager(TransactionManager value) {
-        this.transactionManager = value;
-    }
-
-    /**
      * Gets the value of the connectionManager property.
      *
      * @return possible object is
-     *         {@link ConnectionManager }
+     *         {@link org.apache.openejb.config.sys.ConnectionManager }
      */
     public ConnectionManager getConnectionManager() {
         return connectionManager;
@@ -182,60 +131,13 @@ public class Openejb {
      * Sets the value of the connectionManager property.
      *
      * @param value allowed object is
-     *              {@link ConnectionManager }
+     *              {@link org.apache.openejb.config.sys.ConnectionManager }
      */
     public void setConnectionManager(ConnectionManager value) {
         this.connectionManager = value;
     }
 
     /**
-     * Gets the value of the proxyFactory property.
-     *
-     * @return possible object is
-     *         {@link ProxyFactory }
-     */
-    public ProxyFactory getProxyFactory() {
-        return proxyFactory;
-    }
-
-    /**
-     * Sets the value of the proxyFactory property.
-     *
-     * @param value allowed object is
-     *              {@link ProxyFactory }
-     */
-    public void setProxyFactory(ProxyFactory value) {
-        this.proxyFactory = value;
-    }
-
-    /**
-     * Gets the value of the connector property.
-     * <p/>
-     * <p/>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the connector property.
-     * <p/>
-     * <p/>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getConnector().add(newItem);
-     * </pre>
-     * <p/>
-     * <p/>
-     * <p/>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Connector }
-     */
-    private List<Connector> getConnector() {
-        if (connector == null) {
-            connector = new ArrayList<Connector>();
-        }
-        return this.connector;
-    }
-
-    /**
      * Gets the value of the resource property.
      * <p/>
      * <p/>
@@ -253,75 +155,25 @@ public class Openejb {
      * <p/>
      * <p/>
      * Objects of the following type(s) are allowed in the list
-     * {@link Resource }
+     * {@link org.apache.openejb.config.sys.Resource }
      */
     public List<Resource> getResource() {
         if (resource == null) {
             resource = new ArrayList<Resource>();
         }
 
-        List<Connector> connectors = getConnector();
-        if (connectors.size() > 0){
-            for (Connector connector : connectors) {
-                Resource resource = new Resource();
-                resource.setJar(connector.getJar());
-                resource.setId(connector.getId());
-                resource.setType(connector.getType());
-                resource.setProvider(connector.getProvider());
-                resource.getProperties().putAll(connector.getProperties());
-                this.resource.add(resource);
-            }
-            connectors.clear();
-        }
         return this.resource;
     }
 
-    /**
-     * Gets the value of the deployments property.
-     * <p/>
-     * <p/>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the deployments property.
-     * <p/>
-     * <p/>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getDeployments().add(newItem);
-     * </pre>
-     * <p/>
-     * <p/>
-     * <p/>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Deployments }
-     */
-    public List<Deployments> getDeployments() {
-        if (deployments == null) {
-            deployments = new ArrayList<Deployments>();
-        }
-        return this.deployments;
-    }
-
     public void add(Object service) {
         if (service instanceof Container) {
             getContainer().add((Container) service);
-        } else if (service instanceof Connector) {
-            getConnector().add((Connector) service);
         } else if (service instanceof Resource) {
             getResource().add((Resource) service);
         } else if (service instanceof JndiProvider) {
             getJndiProvider().add((JndiProvider) service);
         } else if (service instanceof ConnectionManager) {
             setConnectionManager((ConnectionManager) service);
-        } else if (service instanceof ProxyFactory) {
-            setProxyFactory((ProxyFactory) service);
-        } else if (service instanceof TransactionManager) {
-            setTransactionManager((TransactionManager) service);
-        } else if (service instanceof SecurityService) {
-            setSecurityService((SecurityService) service);
-        } else if (service instanceof Deployments) {
-            getDeployments().add((Deployments) service);
         }
     }
 }