geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r331239 [2/2] - in /geronimo/trunk: applications/console-core/src/java/org/apache/geronimo/console/util/ applications/console-ear/src/plan/ applications/console-framework/src/webapp/WEB-INF/data/ applications/console-standard/ applications/...
Date Mon, 07 Nov 2005 08:13:00 GMT
Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/dbwizard/testConnection.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml (original)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml Mon Nov  7 00:12:29
2005
@@ -237,6 +237,20 @@
     </servlet>
     <servlet>
         <description>Automated generated Portlet Wrapper</description>
+        <display-name>Pluto Wrapper for Database Wizard Portlet</display-name>
+        <servlet-name>DBWizard</servlet-name>
+        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
+        <init-param>
+            <param-name>portlet-class</param-name>
+            <param-value>org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet</param-value>
+        </init-param>
+        <init-param>
+            <param-name>portlet-guid</param-name>
+            <param-value>console-standard.DBWizard</param-value>
+        </init-param>
+    </servlet>
+    <servlet>
+        <description>Automated generated Portlet Wrapper</description>
         <display-name>Pluto Wrapper for JMS ConnectionFactory Portlet</display-name>
         <servlet-name>JMSConnections</servlet-name>
         <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
@@ -731,6 +745,10 @@
     <servlet-mapping>
         <servlet-name>Databases</servlet-name>
         <url-pattern>/Databases/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>DBWizard</servlet-name>
+        <url-pattern>/DBWizard/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>SEUsers</servlet-name>

Modified: geronimo/trunk/modules/assembly/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/project.xml?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/project.xml (original)
+++ geronimo/trunk/modules/assembly/project.xml Mon Nov  7 00:12:29 2005
@@ -206,6 +206,15 @@
 
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-deploy-config</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <repository>true</repository>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-directory</artifactId>
             <version>${pom.currentVersion}</version>
             <properties>
@@ -507,6 +516,15 @@
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-j2ee-schema</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <repository>true</repository>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-test-ddbean</artifactId>
             <version>${pom.currentVersion}</version>
             <properties>
                 <repository>true</repository>

Modified: geronimo/trunk/modules/assembly/src/plan/system-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/system-plan.xml?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/system-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/system-plan.xml Mon Nov  7 00:12:29 2005
@@ -78,7 +78,7 @@
 <!--    </gbean>-->
 
     <!-- Repository -->
-    <gbean name="Repository" class="org.apache.geronimo.system.repository.ReadOnlyRepository">
+    <gbean name="Repository" class="org.apache.geronimo.system.repository.FileSystemRepository">
         <attribute name="root">repository/</attribute>
         <reference name="ServerInfo">
             <name>ServerInfo</name>

Modified: geronimo/trunk/modules/assembly/src/plan/webconsole-jetty-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/webconsole-jetty-plan.xml?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/webconsole-jetty-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/webconsole-jetty-plan.xml Mon Nov  7 00:12:29
2005
@@ -20,6 +20,47 @@
         <artifactId>geronimo-console-core</artifactId>
         <version>${geronimo_version}</version>
     </dependency>
+    <!-- The following are for configuration and deployment via JSR-88 -->
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-test-ddbean</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-deploy-jsr88</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-deploy-config</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-service-builder</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-connector-builder</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-j2ee-schema</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>xmlbeans</groupId>
+        <artifactId>xbean</artifactId>
+        <version>${xmlbeans_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>stax</groupId>
+        <artifactId>stax-api</artifactId>
+        <version>${stax_api_version}</version>
+    </dependency>
 
     <!-- Keystore dependency -->
     <dependency>

Modified: geronimo/trunk/modules/assembly/src/plan/webconsole-tomcat-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/webconsole-tomcat-plan.xml?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/webconsole-tomcat-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/webconsole-tomcat-plan.xml Mon Nov  7 00:12:29
2005
@@ -20,6 +20,47 @@
         <artifactId>geronimo-console-core</artifactId>
         <version>${geronimo_version}</version>
     </dependency>
+    <!-- The following are for configuration and deployment via JSR-88 -->
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-test-ddbean</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-deploy-jsr88</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-deploy-config</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-service-builder</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-connector-builder</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <artifactId>geronimo-j2ee-schema</artifactId>
+        <version>${geronimo_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>xmlbeans</groupId>
+        <artifactId>xbean</artifactId>
+        <version>${xmlbeans_version}</version>
+    </dependency>
+    <dependency>
+        <groupId>stax</groupId>
+        <artifactId>stax-api</artifactId>
+        <version>${stax_api_version}</version>
+    </dependency>
 
     <!-- Keystore dependency -->
     <dependency>

Modified: geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties (original)
+++ geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties Mon Nov  7 00:12:29
2005
@@ -48,3 +48,8 @@
 log4j.category.org.activemq.store.jdbc.adapter.DefaultJDBCAdapter=ERROR
 
 log4j.category.org.apache.commons.digester=ERROR
+
+# Don't need so much info on every web page that's rendered
+log4j.category.org.mortbay=INFO
+log4j.category.org.apache.pluto=INFO
+log4j.category.org.apache.jasper=INFO

Modified: geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/RARConfigurer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/RARConfigurer.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/RARConfigurer.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/RARConfigurer.java
Mon Nov  7 00:12:29 2005
@@ -23,6 +23,7 @@
 
 import org.apache.geronimo.connector.deployment.dconfigbean.ResourceAdapterDConfigRoot;
 import org.apache.geronimo.connector.deployment.dconfigbean.ResourceAdapter_1_0DConfigRoot;
+import org.apache.geronimo.connector.deployment.jsr88.Connector15DCBRoot;
 import org.apache.geronimo.deployment.ModuleConfigurer;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -38,7 +39,7 @@
     public DeploymentConfiguration createConfiguration(DeployableObject deployable) {
         if (ModuleType.RAR.equals(deployable.getType())) {
             if (deployable.getDDBeanRoot().getDDBeanRootVersion().equals("1.5")) {
-                return new RARConfiguration(deployable, new ResourceAdapterDConfigRoot(deployable.getDDBeanRoot()));
+                return new RARConfiguration(deployable, new Connector15DCBRoot(deployable.getDDBeanRoot()));
             }
             String[] specVersion = deployable.getDDBeanRoot().getText("connector/spec-version");
             if (specVersion.length > 0 && "1.0".equals(specVersion[0])) {

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5DConfigBeanTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5DConfigBeanTest.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5DConfigBeanTest.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5DConfigBeanTest.java
Mon Nov  7 00:12:29 2005
@@ -56,6 +56,8 @@
  *
  * */
 public class RAR_1_5DConfigBeanTest extends TestCase {
+    public void testNothing() {}
+    /* In the process of replacing the Connector 1.5 DConfigBeans
     private static final File basedir = new File(System.getProperty("basedir", System.getProperty("user.dir")));
     private URL j2eeDD;
     XmlOptions xmlOptions;
@@ -183,5 +185,5 @@
         errors = new ArrayList();
         xmlOptions.setErrorListener(errors);
     }
-
+*/
 }

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/JCAResourceImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/JCAResourceImpl.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/JCAResourceImpl.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/JCAResourceImpl.java
Mon Nov  7 00:12:29 2005
@@ -43,7 +43,7 @@
         this.kernel = kernel;
 
         ObjectName myObjectName = JMXUtil.getObjectName(objectName);
-        moduleContext = J2eeContextImpl.newContext(myObjectName, NameFactory.JCA_RESOURCE);
+        moduleContext = J2eeContextImpl.newModuleContext(myObjectName, NameFactory.JCA_RESOURCE);
     }
 
     public String[] getConnectionFactories() {

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
Mon Nov  7 00:12:29 2005
@@ -35,7 +35,7 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.transaction.manager.NamedXAResource;
 import org.apache.geronimo.transaction.manager.ResourceManager;
-import org.apache.geronimo.management.JCAManagedConnectionFactory;
+import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java
Mon Nov  7 00:12:29 2005
@@ -22,7 +22,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.transaction.manager.ResourceManager;
-import org.apache.geronimo.management.JCAManagedConnectionFactory;
+import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
 
 /**
  *

Modified: geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
(original)
+++ geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
Mon Nov  7 00:12:29 2005
@@ -29,7 +29,10 @@
 import javax.management.remote.JMXServiceURL;
 
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
+import org.apache.geronimo.deployment.plugin.jmx.RemoteDeploymentManager;
+import org.apache.geronimo.deployment.plugin.jmx.LocalDeploymentManager;
 import org.apache.geronimo.deployment.plugin.DisconnectedDeploymentManager;
+import org.apache.geronimo.kernel.KernelRegistry;
 
 /**
  * Implementation of JSR88 DeploymentFactory.
@@ -79,13 +82,16 @@
                 try {
                     JMXServiceURL address = new JMXServiceURL("service:" + uri);
                     JMXConnector jmxConnector = JMXConnectorFactory.connect(address, environment);
-                    JMXDeploymentManager manager = new JMXDeploymentManager(jmxConnector);
+                    JMXDeploymentManager manager = new RemoteDeploymentManager(jmxConnector);
                     return manager;
                 } catch (IOException e) {
                     throw (DeploymentManagerCreationException)new DeploymentManagerCreationException(e.getMessage()).initCause(e);
                 } catch (SecurityException e) {
                     throw (AuthenticationFailedException) new AuthenticationFailedException("Invalid
login.").initCause(e);
                 }
+            } else if(uri.equals("inVM")) { //todo: allow specifying a kernel by name
+                JMXDeploymentManager manager = new LocalDeploymentManager(KernelRegistry.getSingleKernel());
+                return manager;
             } else {
                 throw new DeploymentManagerCreationException("Invalid URI: " + uri);
             }

Modified: geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
(original)
+++ geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
Mon Nov  7 00:12:29 2005
@@ -17,7 +17,6 @@
 package org.apache.geronimo.deployment.plugin.jmx;
 
 import java.io.File;
-import java.io.IOException;
 import java.io.InputStream;
 import java.util.*;
 import javax.enterprise.deploy.model.DeployableObject;
@@ -31,11 +30,8 @@
 import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
 import javax.enterprise.deploy.spi.exceptions.TargetException;
 import javax.enterprise.deploy.spi.status.ProgressObject;
-import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 import javax.management.MalformedObjectNameException;
-import javax.management.remote.JMXConnector;
-
 import org.apache.geronimo.deployment.plugin.TargetImpl;
 import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
 import org.apache.geronimo.deployment.plugin.local.*;
@@ -44,28 +40,22 @@
 import org.apache.geronimo.kernel.config.NoSuchStoreException;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
-import org.apache.geronimo.kernel.jmx.KernelDelegate;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.connector.deployment.RARConfigurer;
 import org.apache.geronimo.web.deployment.WARConfigurer;
-import org.apache.geronimo.gbean.GBeanQuery;
 
 
 /**
  * @version $Rev$ $Date$
  */
-public class JMXDeploymentManager implements DeploymentManager {
-    private JMXConnector jmxConnector;
-    private MBeanServerConnection mbServerConnection;
+public abstract class JMXDeploymentManager implements DeploymentManager {
     private Kernel kernel;
     private ConfigurationManager configurationManager;
     private CommandContext commandContext;
 
-    public JMXDeploymentManager(JMXConnector jmxConnector) throws IOException {
-        this.jmxConnector = jmxConnector;
-        mbServerConnection = jmxConnector.getMBeanServerConnection();
-        kernel = new KernelDelegate(mbServerConnection);
+    protected void initialize(Kernel kernel) {
+        this.kernel = kernel;
         configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
         commandContext = new CommandContext();
         commandContext.setLogErrors(true);
@@ -75,11 +65,7 @@
     public void release() {
         try {
             ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
-            jmxConnector.close();
-        } catch (IOException e) {
-            throw (IllegalStateException) new IllegalStateException("Unable to close connection").initCause(e);
         } finally {
-            mbServerConnection = null;
             configurationManager = null;
             kernel = null;
         }

Added: geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java?rev=331239&view=auto
==============================================================================
--- geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java
(added)
+++ geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java
Mon Nov  7 00:12:29 2005
@@ -0,0 +1,30 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.deployment.plugin.jmx;
+
+import org.apache.geronimo.kernel.Kernel;
+
+/**
+ * Connects to a kernel in the same VM.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class LocalDeploymentManager extends JMXDeploymentManager {
+    public LocalDeploymentManager(Kernel kernel) {
+        initialize(kernel);
+    }
+}

Propchange: geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java?rev=331239&view=auto
==============================================================================
--- geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
(added)
+++ geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
Mon Nov  7 00:12:29 2005
@@ -0,0 +1,50 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.deployment.plugin.jmx;
+
+import java.io.IOException;
+import javax.management.remote.JMXConnector;
+import javax.management.MBeanServerConnection;
+import org.apache.geronimo.kernel.jmx.KernelDelegate;
+
+/**
+ * Connects to a Kernel in a remote VM.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class RemoteDeploymentManager extends JMXDeploymentManager {
+    private JMXConnector jmxConnector;
+    private MBeanServerConnection mbServerConnection;
+
+    public RemoteDeploymentManager(JMXConnector jmxConnector) throws IOException {
+        this.jmxConnector = jmxConnector;
+        mbServerConnection = jmxConnector.getMBeanServerConnection();
+        initialize(new KernelDelegate(mbServerConnection));
+    }
+
+    public void release() {
+        super.release();
+        try {
+            jmxConnector.close();
+            jmxConnector = null;
+        } catch (IOException e) {
+            throw (IllegalStateException) new IllegalStateException("Unable to close connection").initCause(e);
+        } finally {
+            mbServerConnection = null;
+        }
+    }
+}

Propchange: geronimo/trunk/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
(original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
Mon Nov  7 00:12:29 2005
@@ -26,6 +26,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
@@ -161,6 +162,18 @@
 
     public String[] getThreadPools() {
         GBeanQuery query = new GBeanQuery(null, GeronimoExecutor.class.getName());
+        Set set = kernel.listGBeans(query);
+        String[] names = new String[set.size()];
+        int i=0;
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            names[i++] = name.getCanonicalName();
+        }
+        return names;
+    }
+
+    public String[] getRepositories() {
+        GBeanQuery query = new GBeanQuery(null, Repository.class.getName());
         Set set = kernel.listGBeans(query);
         String[] names = new String[set.size()];
         int i=0;

Added: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/ListableRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/ListableRepository.java?rev=331239&view=auto
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/ListableRepository.java
(added)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/ListableRepository.java
Mon Nov  7 00:12:29 2005
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.kernel.repository;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * For repositories that can provide a list of their contents.
+ * Normally local ones can handle it, but remote ones may or may
+ * not implement this.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public interface ListableRepository extends Repository {
+    /**
+     * Gets a list of all the items available in the repository.
+     */ 
+    public URI[] listURIs() throws URISyntaxException;
+}

Propchange: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/ListableRepository.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java
Mon Nov  7 00:12:29 2005
@@ -22,6 +22,12 @@
 import java.net.URL;
 
 /**
+ * Provides access to things like JARs via a standard API.  Generally
+ * these may be local (file: URLs) or remote (http: URLs).  This is
+ * a fairly limited read-only type repository.  There are additional
+ * interfaces that a Repository may implement to indicate additional
+ * capabilities.
+ *
  * @version $Rev$ $Date$
  */
 public interface Repository {

Added: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/WriteableRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/WriteableRepository.java?rev=331239&view=auto
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/WriteableRepository.java
(added)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/WriteableRepository.java
Mon Nov  7 00:12:29 2005
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.kernel.repository;
+
+import java.net.URI;
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * A repository that accepts new entries.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public interface WriteableRepository {
+    /**
+     * Copies a file from the server's filesystem into the repository.
+     * Obviously to use this remotely, you must have some other way
+     * to upload the file to the server's filesystem, even if the
+     * the server is just going to turn around and upload it to some
+     * other remote location.
+     */
+    public void copyToRepository(File source, URI destination) throws IOException;
+}

Propchange: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/repository/WriteableRepository.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java?rev=331239&r1=331238&r2=331239&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java
(original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java
Mon Nov  7 00:12:29 2005
@@ -57,4 +57,14 @@
      * @return The ObjectNames of the thread pools, in String form.
      */
     public String[] getThreadPools();
+
+    /**
+     * Gets the ObjectNames of the Repositories associated with this
+     * J2EEServer.
+     *
+     * @see org.apache.geronimo.kernel.repository.Repository
+     *
+     * @return The ObjectNames of the repositories, in String form.
+     */
+    public String[] getRepositories();
 }

Added: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAManagedConnectionFactory.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAManagedConnectionFactory.java?rev=331239&view=auto
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAManagedConnectionFactory.java
(added)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAManagedConnectionFactory.java
Mon Nov  7 00:12:29 2005
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.management.geronimo;
+
+/**
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public interface JCAManagedConnectionFactory extends org.apache.geronimo.management.JCAManagedConnectionFactory
{
+    public String getManagedConnectionFactoryClass();
+
+    public String getConnectionFactoryInterface() ;
+
+    public String[] getImplementedInterfaces();
+
+    public String getConnectionFactoryImplClass();
+
+    public String getConnectionInterface();
+
+    public String getConnectionImplClass();
+}

Propchange: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JCAManagedConnectionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java?rev=331239&view=auto
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
(added)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
Mon Nov  7 00:12:29 2005
@@ -0,0 +1,172 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.system.repository;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.BufferedOutputStream;
+import java.io.FileOutputStream;
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.FileFilter;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.net.URISyntaxException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.ListableRepository;
+import org.apache.geronimo.kernel.repository.WriteableRepository;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+
+/**
+ * @version $Rev: 156292 $ $Date: 2005-03-05 21:48:02 -0500 (Sat, 05 Mar 2005) $
+ */
+public class FileSystemRepository implements Repository, ListableRepository, WriteableRepository,
GBeanLifecycle {
+    private static final Log log = LogFactory.getLog(FileSystemRepository.class);
+    private final URI root;
+    private final ServerInfo serverInfo;
+    private URI rootURI;
+    private File rootFile;
+
+    public FileSystemRepository(URI root, ServerInfo serverInfo) {
+        this.root = root;
+        this.serverInfo = serverInfo;
+    }
+
+    public boolean hasURI(URI uri) {
+        uri = rootURI.resolve(uri);
+        if ("file".equals(uri.getScheme())) {
+            File f = new File(uri);
+            return f.exists() && f.canRead();
+        } else {
+            return false;
+        }
+    }
+
+    public URL getURL(URI uri) throws MalformedURLException {
+        URL url = rootURI.resolve(uri).toURL();
+        if(!url.getProtocol().equals("file")) {
+            return null;
+        }
+        return url;
+    }
+
+    public URI[] listURIs() throws URISyntaxException {
+        String[] results = getFiles(rootFile, "");
+        URI[] out = new URI[results.length];
+        for (int i = 0; i < out.length; i++) {
+            out[i] = new URI(results[i]);
+        }
+        return out;
+    }
+
+    public String[] getFiles(File base, String prefix) {
+        if(!base.canRead() || !base.isDirectory()) {
+            throw new IllegalArgumentException(base.getAbsolutePath());
+        }
+        List list = new ArrayList();
+        File[] hits = base.listFiles();
+        for (int i = 0; i < hits.length; i++) {
+            File hit = hits[i];
+            if(hit.canRead()) {
+                if(hit.isDirectory()) {
+                    list.addAll(Arrays.asList(getFiles(hit, prefix.equals("") ? hit.getName()
: prefix+"/"+hit.getName())));
+                } else {
+                    list.add(prefix.equals("") ? hit.getName() : prefix+"/"+hit.getName());
+                }
+            }
+        }
+        return (String[]) list.toArray(new String[list.size()]);
+    }
+
+    public void copyToRepository(File source, URI destination) throws IOException {
+        if(!source.exists() || !source.canRead() || source.isDirectory()) {
+            throw new IllegalArgumentException("Cannot read source file at "+source.getAbsolutePath());
+        }
+        File dest = new File(rootURI.resolve(destination));
+        if(dest.exists()) {
+            throw new IllegalArgumentException("Destination "+dest.getAbsolutePath()+" already
exists!");
+        }
+        final File parent = dest.getParentFile();
+        if(!parent.exists() && !parent.mkdirs()) {
+            throw new RuntimeException("Unable to create directories from "+rootFile.getAbsolutePath()+"
to "+parent.getAbsolutePath());
+        }
+        log.debug("Copying "+source.getAbsolutePath()+" to "+dest.getAbsolutePath());
+        BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(dest));
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(source));
+        byte[] buf = new byte[1024];
+        int count;
+        while((count = in.read(buf)) > -1) {
+            out.write(buf, 0, count);
+        }
+        out.flush();
+        out.close();
+        in.close();
+    }
+
+    public void doStart() throws Exception {
+        if (rootURI == null) {
+            rootURI = serverInfo.resolve(root);
+            if(!rootURI.getScheme().equals("file")) {
+                throw new IllegalStateException("FileSystemRepository must have a root that's
a local directory (not "+rootURI+")");
+            }
+            rootFile = new File(rootURI);
+            if(!rootFile.exists() || !rootFile.isDirectory() || !rootFile.canRead() || !rootFile.canWrite())
{
+                throw new IllegalStateException("FileSystemRepository must have a root that's
a valid writable directory (not "+rootFile.getAbsolutePath()+")");
+            }
+        }
+        log.info("Repository root is " + rootFile.getAbsolutePath());
+    }
+
+    public void doStop() throws Exception {
+    }
+
+    public void doFail() {
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(FileSystemRepository.class);
+
+        infoFactory.addAttribute("root", URI.class, true);
+
+        infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
+
+        infoFactory.addInterface(Repository.class);
+        infoFactory.addInterface(ListableRepository.class);
+        infoFactory.addInterface(WriteableRepository.class);
+
+        infoFactory.setConstructor(new String[]{"root", "ServerInfo"});
+
+        GBEAN_INFO = infoFactory.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}

Propchange: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message