servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r538038 [2/2] - in /incubator/servicemix/branches/osgi/servicemix-osgi: ./ bundles/ bundles/commons-logging/ bundles/ejb/ bundles/geronimo-transaction/ bundles/howl/ bundles/j2ee-connector/ bundles/j2ee-management/ bundles/jta/ jmx/ jmx/org...
Date Tue, 15 May 2007 02:06:15 GMT
Added: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/org.apache.servicemix.osgi.jmx.server/src/main/java/org/apache/servicemix/osgi/jmx/server/impl/JmxServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/servicemix-osgi/jmx/org.apache.servicemix.osgi.jmx.server/src/main/java/org/apache/servicemix/osgi/jmx/server/impl/JmxServerImpl.java?view=auto&rev=538038
==============================================================================
--- incubator/servicemix/branches/osgi/servicemix-osgi/jmx/org.apache.servicemix.osgi.jmx.server/src/main/java/org/apache/servicemix/osgi/jmx/server/impl/JmxServerImpl.java
(added)
+++ incubator/servicemix/branches/osgi/servicemix-osgi/jmx/org.apache.servicemix.osgi.jmx.server/src/main/java/org/apache/servicemix/osgi/jmx/server/impl/JmxServerImpl.java
Mon May 14 19:06:12 2007
@@ -0,0 +1,495 @@
+/*
+ * 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.servicemix.osgi.jmx.server.impl;
+
+import java.io.ObjectInputStream;
+import java.util.Set;
+
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.AttributeNotFoundException;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
+import javax.management.IntrospectionException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.ListenerNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanInfo;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.NotCompliantMBeanException;
+import javax.management.NotificationFilter;
+import javax.management.NotificationListener;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+import javax.management.OperationsException;
+import javax.management.QueryExp;
+import javax.management.ReflectionException;
+import javax.management.loading.ClassLoaderRepository;
+
+import org.apache.servicemix.osgi.jmx.server.JmxServer;
+
+/**
+ * 
+ * @author gnodet
+ */
+public class JmxServerImpl implements JmxServer {
+
+    private MBeanServer server;
+
+    public JmxServerImpl(MBeanServer server) {
+        this.server = server;
+    }
+
+    /**
+     * @param name
+     * @param listener
+     * @param filter
+     * @param handback
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#addNotificationListener(javax.management.ObjectName,
javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
+     */
+    public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter
filter, Object handback) throws InstanceNotFoundException {
+        server.addNotificationListener(name, listener, filter, handback);
+    }
+
+    /**
+     * @param name
+     * @param listener
+     * @param filter
+     * @param handback
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#addNotificationListener(javax.management.ObjectName,
javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)
+     */
+    public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter
filter, Object handback) throws InstanceNotFoundException {
+        server.addNotificationListener(name, listener, filter, handback);
+    }
+
+    /**
+     * @param className
+     * @param name
+     * @param params
+     * @param signature
+     * @return
+     * @throws ReflectionException
+     * @throws InstanceAlreadyExistsException
+     * @throws MBeanRegistrationException
+     * @throws MBeanException
+     * @throws NotCompliantMBeanException
+     * @see javax.management.MBeanServer#createMBean(java.lang.String, javax.management.ObjectName,
java.lang.Object[], java.lang.String[])
+     */
+    public ObjectInstance createMBean(String className, ObjectName name, Object[] params,
String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException,
MBeanException, NotCompliantMBeanException {
+        return server.createMBean(className, name, params, signature);
+    }
+
+    /**
+     * @param className
+     * @param name
+     * @param loaderName
+     * @param params
+     * @param signature
+     * @return
+     * @throws ReflectionException
+     * @throws InstanceAlreadyExistsException
+     * @throws MBeanRegistrationException
+     * @throws MBeanException
+     * @throws NotCompliantMBeanException
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#createMBean(java.lang.String, javax.management.ObjectName,
javax.management.ObjectName, java.lang.Object[], java.lang.String[])
+     */
+    public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName,
Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException,
MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
{
+        return server.createMBean(className, name, loaderName, params, signature);
+    }
+
+    /**
+     * @param className
+     * @param name
+     * @param loaderName
+     * @return
+     * @throws ReflectionException
+     * @throws InstanceAlreadyExistsException
+     * @throws MBeanRegistrationException
+     * @throws MBeanException
+     * @throws NotCompliantMBeanException
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#createMBean(java.lang.String, javax.management.ObjectName,
javax.management.ObjectName)
+     */
+    public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName)
throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException,
NotCompliantMBeanException, InstanceNotFoundException {
+        return server.createMBean(className, name, loaderName);
+    }
+
+    /**
+     * @param className
+     * @param name
+     * @return
+     * @throws ReflectionException
+     * @throws InstanceAlreadyExistsException
+     * @throws MBeanRegistrationException
+     * @throws MBeanException
+     * @throws NotCompliantMBeanException
+     * @see javax.management.MBeanServer#createMBean(java.lang.String, javax.management.ObjectName)
+     */
+    public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException,
InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
{
+        return server.createMBean(className, name);
+    }
+
+    /**
+     * @param name
+     * @param data
+     * @return
+     * @throws InstanceNotFoundException
+     * @throws OperationsException
+     * @deprecated
+     * @see javax.management.MBeanServer#deserialize(javax.management.ObjectName, byte[])
+     */
+    public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException,
OperationsException {
+        return server.deserialize(name, data);
+    }
+
+    /**
+     * @param className
+     * @param data
+     * @return
+     * @throws OperationsException
+     * @throws ReflectionException
+     * @deprecated
+     * @see javax.management.MBeanServer#deserialize(java.lang.String, byte[])
+     */
+    public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException,
ReflectionException {
+        return server.deserialize(className, data);
+    }
+
+    /**
+     * @param className
+     * @param loaderName
+     * @param data
+     * @return
+     * @throws InstanceNotFoundException
+     * @throws OperationsException
+     * @throws ReflectionException
+     * @deprecated
+     * @see javax.management.MBeanServer#deserialize(java.lang.String, javax.management.ObjectName,
byte[])
+     */
+    public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[]
data) throws InstanceNotFoundException, OperationsException, ReflectionException {
+        return server.deserialize(className, loaderName, data);
+    }
+
+    /**
+     * @param name
+     * @param attribute
+     * @return
+     * @throws MBeanException
+     * @throws AttributeNotFoundException
+     * @throws InstanceNotFoundException
+     * @throws ReflectionException
+     * @see javax.management.MBeanServer#getAttribute(javax.management.ObjectName, java.lang.String)
+     */
+    public Object getAttribute(ObjectName name, String attribute) throws MBeanException,
AttributeNotFoundException, InstanceNotFoundException, ReflectionException {
+        return server.getAttribute(name, attribute);
+    }
+
+    /**
+     * @param name
+     * @param attributes
+     * @return
+     * @throws InstanceNotFoundException
+     * @throws ReflectionException
+     * @see javax.management.MBeanServer#getAttributes(javax.management.ObjectName, java.lang.String[])
+     */
+    public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException,
ReflectionException {
+        return server.getAttributes(name, attributes);
+    }
+
+    /**
+     * @param loaderName
+     * @return
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#getClassLoader(javax.management.ObjectName)
+     */
+    public ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException
{
+        return server.getClassLoader(loaderName);
+    }
+
+    /**
+     * @param mbeanName
+     * @return
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#getClassLoaderFor(javax.management.ObjectName)
+     */
+    public ClassLoader getClassLoaderFor(ObjectName mbeanName) throws InstanceNotFoundException
{
+        return server.getClassLoaderFor(mbeanName);
+    }
+
+    /**
+     * @return
+     * @see javax.management.MBeanServer#getClassLoaderRepository()
+     */
+    public ClassLoaderRepository getClassLoaderRepository() {
+        return server.getClassLoaderRepository();
+    }
+
+    /**
+     * @return
+     * @see javax.management.MBeanServer#getDefaultDomain()
+     */
+    public String getDefaultDomain() {
+        return server.getDefaultDomain();
+    }
+
+    /**
+     * @return
+     * @see javax.management.MBeanServer#getDomains()
+     */
+    public String[] getDomains() {
+        return server.getDomains();
+    }
+
+    /**
+     * @return
+     * @see javax.management.MBeanServer#getMBeanCount()
+     */
+    public Integer getMBeanCount() {
+        return server.getMBeanCount();
+    }
+
+    /**
+     * @param name
+     * @return
+     * @throws InstanceNotFoundException
+     * @throws IntrospectionException
+     * @throws ReflectionException
+     * @see javax.management.MBeanServer#getMBeanInfo(javax.management.ObjectName)
+     */
+    public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException,
ReflectionException {
+        return server.getMBeanInfo(name);
+    }
+
+    /**
+     * @param name
+     * @return
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#getObjectInstance(javax.management.ObjectName)
+     */
+    public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException
{
+        return server.getObjectInstance(name);
+    }
+
+    /**
+     * @param className
+     * @param params
+     * @param signature
+     * @return
+     * @throws ReflectionException
+     * @throws MBeanException
+     * @see javax.management.MBeanServer#instantiate(java.lang.String, java.lang.Object[],
java.lang.String[])
+     */
+    public Object instantiate(String className, Object[] params, String[] signature) throws
ReflectionException, MBeanException {
+        return server.instantiate(className, params, signature);
+    }
+
+    /**
+     * @param className
+     * @param loaderName
+     * @param params
+     * @param signature
+     * @return
+     * @throws ReflectionException
+     * @throws MBeanException
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#instantiate(java.lang.String, javax.management.ObjectName,
java.lang.Object[], java.lang.String[])
+     */
+    public Object instantiate(String className, ObjectName loaderName, Object[] params, String[]
signature) throws ReflectionException, MBeanException, InstanceNotFoundException {
+        return server.instantiate(className, loaderName, params, signature);
+    }
+
+    /**
+     * @param className
+     * @param loaderName
+     * @return
+     * @throws ReflectionException
+     * @throws MBeanException
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#instantiate(java.lang.String, javax.management.ObjectName)
+     */
+    public Object instantiate(String className, ObjectName loaderName) throws ReflectionException,
MBeanException, InstanceNotFoundException {
+        return server.instantiate(className, loaderName);
+    }
+
+    /**
+     * @param className
+     * @return
+     * @throws ReflectionException
+     * @throws MBeanException
+     * @see javax.management.MBeanServer#instantiate(java.lang.String)
+     */
+    public Object instantiate(String className) throws ReflectionException, MBeanException
{
+        return server.instantiate(className);
+    }
+
+    /**
+     * @param name
+     * @param operationName
+     * @param params
+     * @param signature
+     * @return
+     * @throws InstanceNotFoundException
+     * @throws MBeanException
+     * @throws ReflectionException
+     * @see javax.management.MBeanServer#invoke(javax.management.ObjectName, java.lang.String,
java.lang.Object[], java.lang.String[])
+     */
+    public Object invoke(ObjectName name, String operationName, Object[] params, String[]
signature) throws InstanceNotFoundException, MBeanException, ReflectionException {
+        return server.invoke(name, operationName, params, signature);
+    }
+
+    /**
+     * @param name
+     * @param className
+     * @return
+     * @throws InstanceNotFoundException
+     * @see javax.management.MBeanServer#isInstanceOf(javax.management.ObjectName, java.lang.String)
+     */
+    public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException
{
+        return server.isInstanceOf(name, className);
+    }
+
+    /**
+     * @param name
+     * @return
+     * @see javax.management.MBeanServer#isRegistered(javax.management.ObjectName)
+     */
+    public boolean isRegistered(ObjectName name) {
+        return server.isRegistered(name);
+    }
+
+    /**
+     * @param name
+     * @param query
+     * @return
+     * @see javax.management.MBeanServer#queryMBeans(javax.management.ObjectName, javax.management.QueryExp)
+     */
+    public Set queryMBeans(ObjectName name, QueryExp query) {
+        return server.queryMBeans(name, query);
+    }
+
+    /**
+     * @param name
+     * @param query
+     * @return
+     * @see javax.management.MBeanServer#queryNames(javax.management.ObjectName, javax.management.QueryExp)
+     */
+    public Set queryNames(ObjectName name, QueryExp query) {
+        return server.queryNames(name, query);
+    }
+
+    /**
+     * @param object
+     * @param name
+     * @return
+     * @throws InstanceAlreadyExistsException
+     * @throws MBeanRegistrationException
+     * @throws NotCompliantMBeanException
+     * @see javax.management.MBeanServer#registerMBean(java.lang.Object, javax.management.ObjectName)
+     */
+    public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException,
MBeanRegistrationException, NotCompliantMBeanException {
+        return server.registerMBean(object, name);
+    }
+
+    /**
+     * @param name
+     * @param listener
+     * @param filter
+     * @param handback
+     * @throws InstanceNotFoundException
+     * @throws ListenerNotFoundException
+     * @see javax.management.MBeanServer#removeNotificationListener(javax.management.ObjectName,
javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
+     */
+    public void removeNotificationListener(ObjectName name, NotificationListener listener,
NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException
{
+        server.removeNotificationListener(name, listener, filter, handback);
+    }
+
+    /**
+     * @param name
+     * @param listener
+     * @throws InstanceNotFoundException
+     * @throws ListenerNotFoundException
+     * @see javax.management.MBeanServer#removeNotificationListener(javax.management.ObjectName,
javax.management.NotificationListener)
+     */
+    public void removeNotificationListener(ObjectName name, NotificationListener listener)
throws InstanceNotFoundException, ListenerNotFoundException {
+        server.removeNotificationListener(name, listener);
+    }
+
+    /**
+     * @param name
+     * @param listener
+     * @param filter
+     * @param handback
+     * @throws InstanceNotFoundException
+     * @throws ListenerNotFoundException
+     * @see javax.management.MBeanServer#removeNotificationListener(javax.management.ObjectName,
javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)
+     */
+    public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter
filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException {
+        server.removeNotificationListener(name, listener, filter, handback);
+    }
+
+    /**
+     * @param name
+     * @param listener
+     * @throws InstanceNotFoundException
+     * @throws ListenerNotFoundException
+     * @see javax.management.MBeanServer#removeNotificationListener(javax.management.ObjectName,
javax.management.ObjectName)
+     */
+    public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException,
ListenerNotFoundException {
+        server.removeNotificationListener(name, listener);
+    }
+
+    /**
+     * @param name
+     * @param attribute
+     * @throws InstanceNotFoundException
+     * @throws AttributeNotFoundException
+     * @throws InvalidAttributeValueException
+     * @throws MBeanException
+     * @throws ReflectionException
+     * @see javax.management.MBeanServer#setAttribute(javax.management.ObjectName, javax.management.Attribute)
+     */
+    public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException,
AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
{
+        server.setAttribute(name, attribute);
+    }
+
+    /**
+     * @param name
+     * @param attributes
+     * @return
+     * @throws InstanceNotFoundException
+     * @throws ReflectionException
+     * @see javax.management.MBeanServer#setAttributes(javax.management.ObjectName, javax.management.AttributeList)
+     */
+    public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws
InstanceNotFoundException, ReflectionException {
+        return server.setAttributes(name, attributes);
+    }
+
+    /**
+     * @param name
+     * @throws InstanceNotFoundException
+     * @throws MBeanRegistrationException
+     * @see javax.management.MBeanServer#unregisterMBean(javax.management.ObjectName)
+     */
+    public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException
{
+        server.unregisterMBean(name);
+    }
+
+}

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/org.apache.servicemix.osgi.jmx.server/src/main/java/org/apache/servicemix/osgi/jmx/server/impl/JmxServerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/org.apache.servicemix.osgi.jmx.server/src/main/java/org/apache/servicemix/osgi/jmx/server/impl/JmxServerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/org.apache.servicemix.osgi.jmx.server/src/main/java/org/apache/servicemix/osgi/jmx/server/impl/JmxServerImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/servicemix-osgi/jmx/pom.xml?view=auto&rev=538038
==============================================================================
--- incubator/servicemix/branches/osgi/servicemix-osgi/jmx/pom.xml (added)
+++ incubator/servicemix/branches/osgi/servicemix-osgi/jmx/pom.xml Mon May 14 19:06:12 2007
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<project>
+
+  <parent>
+    <groupId>org.apache.servicemix</groupId>
+    <artifactId>osgi</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <name>ServiceMix OSGI JMX Bundles</name>
+  <groupId>org.apache.servicemix.osgi</groupId>
+  <artifactId>jmx</artifactId>
+  <packaging>pom</packaging>
+  <version>1.0-SNAPSHOT</version>
+
+  <modules>
+    <module>org.apache.servicemix.osgi.jmx.registry</module>
+    <module>org.apache.servicemix.osgi.jmx.server</module>
+    <module>org.apache.servicemix.osgi.jmx.rmi</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>${felix.version}</version>
+          <executions>
+            <execution>
+              <phase>process-classes</phase>
+              <goals>
+                <goal>manifest</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/jmx/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/servicemix/branches/osgi/servicemix-osgi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/servicemix-osgi/pom.xml?view=auto&rev=538038
==============================================================================
--- incubator/servicemix/branches/osgi/servicemix-osgi/pom.xml (added)
+++ incubator/servicemix/branches/osgi/servicemix-osgi/pom.xml Mon May 14 19:06:12 2007
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<project>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.servicemix</groupId>
+  <artifactId>osgi</artifactId>
+  <packaging>pom</packaging>
+  <name>ServiceMix OSGi</name>
+  <version>1.0-SNAPSHOT</version>
+
+  <modules>
+    <module>bundles</module>
+    <module>jmx</module>
+    <module>transaction</module>
+    <module>dist</module>
+  </modules>
+
+  <properties>
+    <felix.version>0.9.0-incubator-SNAPSHOT</felix.version>
+    <spring.version>2.1-SNAPSHOT</spring.version>
+  </properties>
+
+  <repositories>
+    <repository>
+      <id>apache-snapshots</id>
+      <name>Apache Snapshots Repository</name>
+      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache-snapshots</id>
+      <name>Apache Snapshots repository</name>
+      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration>
+              <source>1.5</source>
+              <target>1.5</target>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>2.1</version>
+          <configuration>
+            <archive>
+              <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+            </archive>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>${felix.version}</version>
+          <executions>
+            <execution>
+              <phase>process-classes</phase>
+              <goals>
+                <goal>manifest</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon May 14 19:06:12 2007
@@ -0,0 +1 @@
+.project

Added: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/pom.xml?view=auto&rev=538038
==============================================================================
--- incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/pom.xml
(added)
+++ incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/pom.xml
Mon May 14 19:06:12 2007
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  
+  <!--
+    
+    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.
+  -->
+  
+  <parent>
+    <groupId>org.apache.servicemix.osgi</groupId>
+    <artifactId>transaction</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>jar</packaging>
+  <name>ServiceMix OSGI Transaction Manager</name>
+  <groupId>org.apache.servicemix.osgi.transaction</groupId>
+  <artifactId>org.apache.servicemix.osgi.transaction.manager</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>${felix.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix.osgi.bundles</groupId>
+      <artifactId>org.apache.servicemix.osgi.bundles.jta</artifactId>
+      <version>1.1-1.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix.osgi.bundles</groupId>
+      <artifactId>org.apache.servicemix.osgi.bundles.geronimo-transaction</artifactId>
+      <version>2.0-SNAPSHOT-1.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+            <Bundle-Activator>${pom.artifactId}.impl.Activator</Bundle-Activator>
+            <Export-Package>
+              ${pom.artifactId}
+            </Export-Package>
+            <DynamicImport-Package>
+              *
+            </DynamicImport-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/src/main/java/org/apache/servicemix/osgi/transaction/manager/impl/Activator.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/src/main/java/org/apache/servicemix/osgi/transaction/manager/impl/Activator.java?view=auto&rev=538038
==============================================================================
--- incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/src/main/java/org/apache/servicemix/osgi/transaction/manager/impl/Activator.java
(added)
+++ incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/src/main/java/org/apache/servicemix/osgi/transaction/manager/impl/Activator.java
Mon May 14 19:06:12 2007
@@ -0,0 +1,95 @@
+package org.apache.servicemix.osgi.transaction.manager.impl;
+
+import java.io.File;
+import java.net.InetAddress;
+import java.util.List;
+
+import javax.transaction.TransactionManager;
+
+import org.apache.geronimo.transaction.log.HOWLLog;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
+import org.apache.geronimo.transaction.manager.TransactionLog;
+import org.apache.geronimo.transaction.manager.XidFactory;
+import org.apache.geronimo.transaction.manager.XidFactoryImpl;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+    private BundleContext context;
+    private HOWLLog transactionLog;
+    private TransactionManager transactionManager;
+
+    /**
+     * Implements BundleActivator.start(). P
+     * 
+     * @param context
+     *            the framework context for the bundle.
+     */
+    public void start(BundleContext context) throws Exception {
+        this.context = context;
+        XidFactory xidFactory = new XidFactoryImpl();
+        File serverBaseDir = null;
+        List resourceManagers = null;
+        transactionLog = new HOWLLog(
+                                     getString("bufferClassName", "org.objectweb.howl.log.BlockLogBuffer"),

+                                     getInteger("bufferSize", 32), 
+                                     getBoolean("checksumEnabled", true), 
+                                     getBoolean("adler32Checksum", true), 
+                                     getInteger("flushSleepTimeMilliseconds", 50), 
+                                     getString("logFileDir", ""), 
+                                     getString("logFileExt", "log"), 
+                                     getString("logFileName", "transaction"), 
+                                     getInteger("maxBlocksPerFile", -1), 
+                                     getInteger("maxBuffers", 0), 
+                                     getInteger("maxLogFiles", 2), 
+                                     getInteger("minBuffers", 4), 
+                                     getInteger("threadsWaitingForceThreshold", -1), 
+                                     xidFactory,
+                                     null);
+        transactionLog.doStart();
+        transactionManager = new GeronimoTransactionManager(
+                                    getInteger("defaultTransactionTimeoutSeconds", 60),
+                                    xidFactory,
+                                    transactionLog,
+                                    resourceManagers);
+        context.registerService(TransactionManager.class.getName(), transactionManager, null);
+    }
+
+    /**
+     * Implements BundleActivator.stop().
+     * 
+     * @param context
+     *            the framework context for the bundle.
+     */
+    public void stop(BundleContext context) throws Exception {
+        transactionLog.doStop();
+        transactionLog = null;
+        transactionManager = null;
+    }
+
+    protected String getString(String name, String def) {
+        String val = context.getProperty("org.apache.servicemix.osgi.transaction.manager."
+ name);
+        if (val == null) {
+            return def;
+        }
+        return val;
+    }
+
+    protected int getInteger(String name, int def) {
+        String val = context.getProperty("org.apache.servicemix.osgi.transaction.manager."
+ name);
+        if (val == null) {
+            return def;
+        }
+        return Integer.parseInt(val);
+    }
+
+    protected boolean getBoolean(String name, boolean def) {
+        String val = context.getProperty("org.apache.servicemix.osgi.transaction.manager."
+ name);
+        if (val == null) {
+            return def;
+        }
+        return Boolean.valueOf(val);
+    }
+
+}

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/src/main/java/org/apache/servicemix/osgi/transaction/manager/impl/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/src/main/java/org/apache/servicemix/osgi/transaction/manager/impl/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/org.apache.servicemix.osgi.transaction.manager/src/main/java/org/apache/servicemix/osgi/transaction/manager/impl/Activator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/osgi/servicemix-osgi/transaction/pom.xml?view=auto&rev=538038
==============================================================================
--- incubator/servicemix/branches/osgi/servicemix-osgi/transaction/pom.xml (added)
+++ incubator/servicemix/branches/osgi/servicemix-osgi/transaction/pom.xml Mon May 14 19:06:12
2007
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<project>
+
+  <parent>
+    <groupId>org.apache.servicemix</groupId>
+    <artifactId>osgi</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <name>ServiceMix OSGI Bundles</name>
+  <groupId>org.apache.servicemix.osgi</groupId>
+  <artifactId>transaction</artifactId>
+  <packaging>pom</packaging>
+  <version>1.0-SNAPSHOT</version>
+
+  <modules>
+    <module>org.apache.servicemix.osgi.transaction.manager</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>${felix.version}</version>
+          <executions>
+            <execution>
+              <phase>process-classes</phase>
+              <goals>
+                <goal>manifest</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/osgi/servicemix-osgi/transaction/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message