geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r497717 - in /geronimo/server/trunk: ./ configs/openejb/src/plan/ modules/geronimo-openejb/ modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ modules/geronimo-openejb/src/main/resources/META-INF/
Date Fri, 19 Jan 2007 06:51:44 GMT
Author: dain
Date: Thu Jan 18 22:51:43 2007
New Revision: 497717

URL: http://svn.apache.org/viewvc?view=rev&rev=497717
Log:
Stubbed out ejb daemon gbean

Added:
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
Modified:
    geronimo/server/trunk/configs/openejb/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-openejb/pom.xml
    geronimo/server/trunk/modules/geronimo-openejb/src/main/resources/META-INF/geronimo-dependency.xml
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/configs/openejb/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/openejb/src/plan/plan.xml?view=diff&rev=497717&r1=497716&r2=497717
==============================================================================
--- geronimo/server/trunk/configs/openejb/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/openejb/src/plan/plan.xml Thu Jan 18 22:51:43 2007
@@ -58,6 +58,15 @@
         </reference>
     </gbean>
 
+    <gbean name="EJBNetworkService" class="org.apache.geronimo.openejb.EjbDaemonGBean">
+        <attribute name="port">${PlanOpenEJBPort}</attribute>
+        <attribute name="host">${PlanServerHostname}</attribute>
+        <attribute name="threads">20</attribute>
+        <dependency>
+            <name>OpenEjbSystem</name>
+        </dependency>
+    </gbean>
+
 <!--
     <gbean name="StatelessEjbContainer" class="org.apache.openejb.slsb.DefaultStatelessEjbContainerGBean">
         <reference name="TransactionManager">

Modified: geronimo/server/trunk/modules/geronimo-openejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/pom.xml?view=diff&rev=497717&r1=497716&r2=497717
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-openejb/pom.xml Thu Jan 18 22:51:43 2007
@@ -37,6 +37,16 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-ejbd</artifactId>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.openejb</groupId>
+          <artifactId>openejb-client</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-connector</artifactId>
             <version>${pom.version}</version>

Added: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java?view=auto&rev=497717
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
(added)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
Thu Jan 18 22:51:43 2007
@@ -0,0 +1,104 @@
+/**
+ * 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.geronimo.openejb;
+
+import java.net.InetSocketAddress;
+import java.util.Properties;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.management.geronimo.NetworkConnector;
+import org.apache.openejb.server.ejbd.EjbDaemon;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EjbDaemonGBean implements NetworkConnector, GBeanLifecycle {
+    private final EjbDaemon ejbDaemon;
+    private String host;
+    private int port;
+    private int threads;
+
+    public EjbDaemonGBean() {
+        ejbDaemon = EjbDaemon.getEjbDaemon();
+    }
+
+    public String getProtocol() {
+        return "ejbd";
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+
+    public int getThreads() {
+        return threads;
+    }
+
+    public void setThreads(int threads) {
+        this.threads = threads;
+    }
+
+    public InetSocketAddress getListenAddress() {
+        return new InetSocketAddress(host, port);
+    }
+
+    public void doStart() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty("server", "org.apache.openejb.server.ejbd.EjbServer");
+        properties.setProperty("bind", host);
+        properties.setProperty("port", Integer.toString(port));
+        if (threads > 0) {
+            properties.setProperty("threads", Integer.toString(threads));
+        }
+        ejbDaemon.init(properties);
+    }
+
+    public void doStop() throws Exception {
+    }
+
+    public void doFail() {
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(EjbDaemonGBean.class);
+        infoBuilder.addAttribute("host", String.class, true);
+        infoBuilder.addAttribute("port", int.class, true);
+        infoBuilder.addAttribute("threads", int.class, true);
+
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/resources/META-INF/geronimo-dependency.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/resources/META-INF/geronimo-dependency.xml?view=diff&rev=497717&r1=497716&r2=497717
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/resources/META-INF/geronimo-dependency.xml
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/resources/META-INF/geronimo-dependency.xml
Thu Jan 18 22:51:43 2007
@@ -27,6 +27,14 @@
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-ejbd</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-client</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-javaagent</artifactId>
     </dependency>
     <dependency>

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?view=diff&rev=497717&r1=497716&r2=497717
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Thu Jan 18 22:51:43 2007
@@ -688,6 +688,18 @@
             </dependency>
 
             <dependency>
+                <groupId>org.apache.openejb</groupId>
+                <artifactId>openejb-client</artifactId>
+                <version>${openejbVersion}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.openejb</groupId>
+                <artifactId>openejb-ejbd</artifactId>
+                <version>${openejbVersion}</version>
+            </dependency>
+
+            <dependency>
                 <groupId>org.tranql</groupId>
                 <artifactId>tranql</artifactId>
                 <version>1.4.1</version>



Mime
View raw message