geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r419048 - in /geronimo/trunk/modules: activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ activemq-gbean/ activemq-gbean/src/main/java/org/apache/activemq/gbean/ activemq-gbean/src/main/java/org/apache/activemq/gbean/management/
Date Tue, 04 Jul 2006 17:14:14 GMT
Author: chirino
Date: Tue Jul  4 10:14:13 2006
New Revision: 419048

URL: http://svn.apache.org/viewvc?rev=419048&view=rev
Log:
http://issues.apache.org/jira/browse/GERONIMO-2135

Removed:
    geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/DataSourceReference.java
Modified:
    geronimo/trunk/modules/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java
    geronimo/trunk/modules/activemq-gbean/project.xml
    geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBean.java
    geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
    geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/TransportConnectorGBeanImpl.java
    geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/management/ActiveMQManagerGBean.java
    geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/package.html

Modified: geronimo/trunk/modules/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java?rev=419048&r1=419047&r2=419048&view=diff
==============================================================================
--- geronimo/trunk/modules/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java
(original)
+++ geronimo/trunk/modules/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java
Tue Jul  4 10:14:13 2006
@@ -27,8 +27,8 @@
     public final static String CONNECTOR_J2EE_TYPE = "JMSConnector";
 
     // Additional stuff you can add to an ActiveMQ connector URI
-    public String getPath();
-    public void setPath(String path);
-    public String getQuery();
-    public void setQuery(String query);
+    String getPath();
+    void setPath(String path);
+    String getQuery();
+    void setQuery(String query);
 }

Modified: geronimo/trunk/modules/activemq-gbean/project.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/activemq-gbean/project.xml?rev=419048&r1=419047&r2=419048&view=diff
==============================================================================
--- geronimo/trunk/modules/activemq-gbean/project.xml (original)
+++ geronimo/trunk/modules/activemq-gbean/project.xml Tue Jul  4 10:14:13 2006
@@ -69,6 +69,12 @@
 
       <dependency>
         <groupId>geronimo</groupId>
+        <artifactId>geronimo-connector</artifactId>
+        <version>${pom.currentVersion}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>geronimo</groupId>
         <artifactId>geronimo-j2ee</artifactId>
         <version>${pom.currentVersion}</version>
       </dependency>

Modified: geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBean.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBean.java?rev=419048&r1=419047&r2=419048&view=diff
==============================================================================
--- geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBean.java
(original)
+++ geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBean.java
Tue Jul  4 10:14:13 2006
@@ -27,8 +27,7 @@
  */
 public interface BrokerServiceGBean extends ActiveMQBroker {
 	
-	public abstract BrokerService getBrokerContainer();	
-	public String getBrokerName();
-
+	abstract BrokerService getBrokerContainer();	
+	String getBrokerName();
 	
 }

Modified: geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java?rev=419048&r1=419047&r2=419048&view=diff
==============================================================================
--- geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
(original)
+++ geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
Tue Jul  4 10:14:13 2006
@@ -25,6 +25,7 @@
 import org.apache.activemq.store.DefaultPersistenceAdapterFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.connector.outbound.ConnectionFactorySource;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
@@ -47,8 +48,8 @@
     private BrokerService brokerService;
     private ServerInfo serverInfo;
     private String dataDirectory;
-    private DataSourceReference dataSource;
-
+    private ConnectionFactorySource dataSource;
+    private ClassLoader classLoader;
     private String objectName;
     private JMSManager manager;
 
@@ -61,7 +62,7 @@
 
     public synchronized void doStart() throws Exception {
         	ClassLoader old = Thread.currentThread().getContextClassLoader();
-        	Thread.currentThread().setContextClassLoader(BrokerServiceGBeanImpl.class.getClassLoader());
+        	Thread.currentThread().setContextClassLoader(getClassLoader());
         	try {
     	        if (brokerService == null) {
     	            brokerService = createContainer();
@@ -110,17 +111,18 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("ActiveMQ Message Broker", BrokerServiceGBeanImpl.class,
"JMSServer");
-        infoFactory.addReference("serverInfo", ServerInfo.class);
-        infoFactory.addAttribute("brokerName", String.class, true);
-        infoFactory.addAttribute("brokerUri", String.class, true);
-        infoFactory.addAttribute("dataDirectory", String.class, true);
-        infoFactory.addReference("dataSource", DataSourceReference.class);
-        infoFactory.addAttribute("objectName", String.class, false);
-        infoFactory.addReference("manager", JMSManager.class);
-        infoFactory.addInterface(BrokerServiceGBean.class);
+        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("ActiveMQ Message Broker", BrokerServiceGBeanImpl.class,
"JMSServer");
+        infoBuilder.addReference("serverInfo", ServerInfo.class);
+        infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
+        infoBuilder.addAttribute("brokerName", String.class, true);
+        infoBuilder.addAttribute("brokerUri", String.class, true);
+        infoBuilder.addAttribute("dataDirectory", String.class, true);
+        infoBuilder.addReference("dataSource", ConnectionFactorySource.class);
+        infoBuilder.addAttribute("objectName", String.class, false);
+        infoBuilder.addReference("manager", JMSManager.class);
+        infoBuilder.addInterface(BrokerServiceGBean.class);
         // infoFactory.setConstructor(new String[]{"brokerName, brokerUri"});
-        GBEAN_INFO = infoFactory.getBeanInfo();
+        GBEAN_INFO = infoBuilder.getBeanInfo();
     }
 
     public static GBeanInfo getGBeanInfo() {
@@ -162,11 +164,11 @@
         this.dataDirectory = dataDir;
     }
 
-    public DataSourceReference getDataSource() {
+    public ConnectionFactorySource getDataSource() {
         return dataSource;
     }
 
-    public void setDataSource(DataSourceReference dataSource) {
+    public void setDataSource(ConnectionFactorySource dataSource) {
         this.dataSource = dataSource;
     }
 
@@ -204,6 +206,17 @@
 
     public void setObjectName(String objectName) {
         this.objectName = objectName;
+    }
+
+    public ClassLoader getClassLoader() {
+        if( classLoader == null ) {
+            classLoader = this.getClass().getClassLoader();
+        }
+        return classLoader;
+    }
+
+    public void setClassLoader(ClassLoader classLoader) {
+        this.classLoader = classLoader;
     }
 	
 }

Modified: geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/TransportConnectorGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/TransportConnectorGBeanImpl.java?rev=419048&r1=419047&r2=419048&view=diff
==============================================================================
--- geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/TransportConnectorGBeanImpl.java
(original)
+++ geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/TransportConnectorGBeanImpl.java
Tue Jul  4 10:14:13 2006
@@ -38,7 +38,7 @@
     private Log log = LogFactory.getLog(getClass().getName());
 
     private TransportConnector transportConnector;
-    private BrokerServiceGBean brokerService;
+    private BrokerServiceGBean brokerServiceGBean;
     
     private String protocol;
     private String host;
@@ -46,9 +46,10 @@
     private String path;
     private String query;
     private String urlAsStarted;
+    private ClassLoader classLoader;
 
-    public TransportConnectorGBeanImpl(BrokerServiceGBean brokerService, String protocol,
String host, int port) {
-        this.brokerService = brokerService;
+    public TransportConnectorGBeanImpl(BrokerServiceGBean brokerServiceGBean, String protocol,
String host, int port) {
+        this.brokerServiceGBean = brokerServiceGBean;
         this.protocol = protocol;
         this.host = host;
         this.port = port;
@@ -113,7 +114,7 @@
 
     public synchronized void doStart() throws Exception {
     	ClassLoader old = Thread.currentThread().getContextClassLoader();
-    	Thread.currentThread().setContextClassLoader(BrokerServiceGBeanImpl.class.getClassLoader());
+    	Thread.currentThread().setContextClassLoader(getClassLoader());
     	try {
 	        if (transportConnector == null) {
                 urlAsStarted = getUrl();
@@ -147,19 +148,31 @@
     }
 
     protected TransportConnector createBrokerConnector(String url) throws Exception {
-        return brokerService.getBrokerContainer().addConnector(url);
+        return brokerServiceGBean.getBrokerContainer().addConnector(url);
+    }
+
+    public ClassLoader getClassLoader() {
+        if( classLoader == null ) {
+            classLoader = this.getClass().getClassLoader();
+        }
+        return classLoader;
+    }
+
+    public void setClassLoader(ClassLoader classLoader) {
+        this.classLoader = classLoader;
     }
 
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("ActiveMQ Transport Connector",
TransportConnectorGBeanImpl.class, CONNECTOR_J2EE_TYPE);
-        infoFactory.addAttribute("url", String.class.getName(), false);
-        infoFactory.addReference("brokerService", BrokerServiceGBean.class);
-        infoFactory.addInterface(ActiveMQConnector.class, new String[]{"host","port","protocol","path","query"},
+        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("ActiveMQ Transport Connector",
TransportConnectorGBeanImpl.class, CONNECTOR_J2EE_TYPE);
+        infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
+        infoBuilder.addAttribute("url", String.class.getName(), false);
+        infoBuilder.addReference("brokerService", BrokerServiceGBean.class);
+        infoBuilder.addInterface(ActiveMQConnector.class, new String[]{"host","port","protocol","path","query"},
                 new String[]{"host","port"});
-        infoFactory.setConstructor(new GConstructorInfo(new String[]{"brokerService", "protocol",
"host", "port"}));
-        GBEAN_INFO = infoFactory.getBeanInfo();
+        infoBuilder.setConstructor(new GConstructorInfo(new String[]{"brokerService", "protocol",
"host", "port"}));
+        GBEAN_INFO = infoBuilder.getBeanInfo();
     }
 
     public static GBeanInfo getGBeanInfo() {

Modified: geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/management/ActiveMQManagerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/management/ActiveMQManagerGBean.java?rev=419048&r1=419047&r2=419048&view=diff
==============================================================================
--- geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/management/ActiveMQManagerGBean.java
(original)
+++ geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/management/ActiveMQManagerGBean.java
Tue Jul  4 10:14:13 2006
@@ -186,7 +186,7 @@
     }
 
     /**
-     * Creates a new connector, and returns the ObjectName for it.  Note that
+     * Returns a new JMSConnector.  Note that
      * the connector may well require further customization before being fully
      * functional (e.g. SSL settings for a secure connector).
      */

Modified: geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/package.html
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/package.html?rev=419048&r1=419047&r2=419048&view=diff
==============================================================================
--- geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/package.html
(original)
+++ geronimo/trunk/modules/activemq-gbean/src/main/java/org/apache/activemq/gbean/package.html
Tue Jul  4 10:14:13 2006
@@ -3,9 +3,7 @@
 </head>
 <body>
 
-<p>
-	The JMS container using GBeaps for deployment in Geronimo or other JSR 77/88 based containers
-</p>
+<p>The JMS container using GBeaps for deployment in Geronimo</p>
 
 </body>
 </html>



Mime
View raw message