servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r616297 [2/2] - in /servicemix/smx4: features/trunk/ features/trunk/assembly/ features/trunk/assembly/src/main/descriptors/ features/trunk/assembly/src/main/filtered-resources/etc/ features/trunk/ejb3/ features/trunk/ejb3/bundles/ features/...
Date Tue, 29 Jan 2008 13:10:51 GMT
Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/AbstractBundleWatcher.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/AbstractBundleWatcher.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/AbstractBundleWatcher.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/AbstractBundleWatcher.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,97 @@
+/*
+ * 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.ejb3.deployer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.SynchronousBundleListener;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.osgi.context.BundleContextAware;
+
+/**
+ */
+public abstract class AbstractBundleWatcher implements BundleContextAware, InitializingBean, DisposableBean {
+
+    private BundleContext bundleContext;
+    private SynchronousBundleListener bundleListener;
+    private List<Bundle> bundles = new ArrayList<Bundle>();
+
+    public void setBundleContext(BundleContext bundleContext) {
+        this.bundleContext = bundleContext;
+    }
+
+    public BundleContext getBundleContext() {
+        return bundleContext;
+    }
+
+    public void afterPropertiesSet() throws Exception {
+        bundleContext.addBundleListener(bundleListener = new SynchronousBundleListener() {
+            public void bundleChanged(BundleEvent event) {
+                switch (event.getType()) {
+                    case BundleEvent.STARTED:
+                        onBundleStarted(event.getBundle());
+                        break;
+                    case BundleEvent.STOPPED:
+                        onBundleStopped(event.getBundle());
+                        break;
+                }
+            }
+        });
+        Bundle[] bundles = bundleContext.getBundles();
+        if (bundles != null) {
+            for (Bundle bundle : bundles) {
+                onBundleStarted(bundle);
+            }
+        }
+    }
+
+    public void destroy() throws Exception {
+        bundleContext.removeBundleListener(bundleListener);
+        for (Bundle bundle : bundles.toArray(new Bundle[bundles.size()])) {
+            if (bundle.getState() == Bundle.ACTIVE) {
+                onBundleStopped(bundle);
+            }
+        }
+    }
+
+    private void onBundleStarted(Bundle bundle) {
+        if (match(bundle) && !bundles.contains(bundle)) {
+            register(bundle);
+            bundles.add(bundle);
+        }
+    }
+
+    private void onBundleStopped(Bundle bundle) {
+        if (bundles.remove(bundle)) {
+            unregister(bundle);
+        }
+    }
+
+    protected boolean match(Bundle bundle) {
+        return true;
+    }
+
+    protected abstract void register(Bundle bundle);
+
+    protected abstract void unregister(Bundle bundle);
+
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/CxfService.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/CxfService.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/CxfService.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/CxfService.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,87 @@
+package org.apache.servicemix.ejb3.deployer;
+
+import java.util.Map;
+import java.util.TreeMap;
+import java.net.URL;
+
+import javax.naming.Context;
+
+import org.apache.cxf.Bus;
+import org.apache.openejb.assembler.classic.AppInfo;
+import org.apache.openejb.server.cxf.CxfWsContainer;
+import org.apache.openejb.server.cxf.CxfCatalogUtils;
+import org.apache.openejb.server.cxf.pojo.PojoWsContainer;
+import org.apache.openejb.server.cxf.ejb.EjbWsContainer;
+import org.apache.openejb.server.cxf.client.SaajInterceptor;
+import org.apache.openejb.server.httpd.HttpListener;
+import org.apache.openejb.core.webservices.PortData;
+import org.apache.openejb.DeploymentInfo;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Jan 28, 2008
+ * Time: 10:29:30 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class CxfService extends org.apache.openejb.server.cxf.CxfService {
+
+    private final Map<String, CxfWsContainer> wsContainers = new TreeMap<String, CxfWsContainer>();
+
+    public CxfService() {
+        SaajInterceptor.registerInterceptors();
+    }
+
+    public String getName() {
+        return "cxf";
+    }
+
+    protected HttpListener createEjbWsContainer(URL moduleBaseUrl, PortData port, DeploymentInfo deploymentInfo) {
+        Bus bus = CxfWsContainer.getBus();
+
+        CxfCatalogUtils.loadOASISCatalog(bus, moduleBaseUrl, "META-INF/jax-ws-catalog.xml");
+
+        EjbWsContainer container = new MyEjbWsContainer(bus, port, deploymentInfo);
+        container.start();
+        wsContainers.put(deploymentInfo.getDeploymentID().toString(), container);
+        return container;
+    }
+
+    protected void destroyEjbWsContainer(String deploymentId) {
+        CxfWsContainer container = wsContainers.remove(deploymentId);
+        if (container != null) {
+            container.destroy();
+        }
+    }
+
+    protected HttpListener createPojoWsContainer(URL moduleBaseUrl, PortData port, String serviceId, Class target, Context context, String contextRoot) {
+        Bus bus = CxfWsContainer.getBus();
+
+        CxfCatalogUtils.loadOASISCatalog(bus, moduleBaseUrl, "META-INF/jax-ws-catalog.xml");
+
+        PojoWsContainer container = new PojoWsContainer(bus, port, context, target);
+        container.start();
+        wsContainers.put(serviceId, container);
+        return container;
+    }
+
+    protected void destroyPojoWsContainer(String serviceId) {
+        CxfWsContainer container = wsContainers.remove(serviceId);
+        if (container != null) {
+            container.destroy();
+        }
+    }
+
+    public void afterApplicationCreated(AppInfo appInfo) {
+        System.out.println("CxfService:afterApplicationCreated");
+        Thread.currentThread().setContextClassLoader(Bus.class.getClassLoader());
+        super.afterApplicationCreated(appInfo);    //To change body of overridden methods use File | Settings | File Templates.
+    }
+
+    public void beforeApplicationDestroyed(AppInfo appInfo) {
+        System.out.println("CxfService:beforeApplicationDestroyed");
+        Thread.currentThread().setContextClassLoader(Bus.class.getClassLoader());
+        super.beforeApplicationDestroyed(appInfo);    //To change body of overridden methods use File | Settings | File Templates.
+    }
+
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Deployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Deployer.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Deployer.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Deployer.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,153 @@
+/*
+ * 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.ejb3.deployer;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.assembler.classic.AppInfo;
+import org.apache.openejb.assembler.classic.Assembler;
+import org.apache.openejb.config.AppModule;
+import org.apache.openejb.config.EjbModule;
+import org.apache.openejb.config.ReadDescriptors;
+import org.apache.openejb.config.WsModule;
+import org.apache.openejb.config.ConfigurationFactory;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.JavaWsdlMapping;
+import org.apache.openejb.jee.WebserviceDescription;
+import org.apache.openejb.jee.Webservices;
+import org.apache.xbean.finder.ResourceFinder;
+import org.osgi.framework.Bundle;
+
+/**
+ * The Deployer contains the code to deploy EJBs given a classloader and a url location.
+ *
+ */
+public class Deployer {
+
+    private static final Log LOGGER = LogFactory.getLog(Deployer.class);
+
+    private static final String EJB_DESCRIPTOR = "META-INF/ejb-jar.xml";
+
+    public void deploy(ClassLoader classLoader, String location) throws Exception {
+
+        // TODO: this does not work
+        Map<String, URL> descriptors = new ResourceFinder(null, classLoader).getResourcesMap("META-INF/");
+
+        URL ejbJarXmlUrl = classLoader.getResource(EJB_DESCRIPTOR);
+        if (ejbJarXmlUrl == null) {
+            LOGGER.debug("Descriptor ejb-jar.xml not found");
+            return;
+        }
+        System.out.println("Descriptor ejb-jar.xml found!");
+        EjbJar ejbJar = ReadDescriptors.readEjbJar(ejbJarXmlUrl);
+        // create the EJB Module
+        EjbModule ejbModule = new EjbModule(classLoader, location, ejbJar, null);
+        ejbModule.getAltDDs().putAll(descriptors);
+
+        // load webservices descriptor
+        addWebservices(ejbModule);
+
+        // wrap the EJB Module with an Application Module
+        AppModule appModule = new AppModule(classLoader, ejbModule.getJarLocation());
+        appModule.getEjbModules().add(ejbModule);
+        ejbModule.setJarLocation(location);
+
+        // Persistence Units
+        addPersistenceUnits(appModule, classLoader);
+
+        // Create application
+        ConfigurationFactory configurationFactory = new ConfigurationFactory();
+        Assembler assembler = (Assembler) SystemInstance.get().getComponent(org.apache.openejb.spi.Assembler.class);
+        AppInfo appInfo = configurationFactory.configureApplication(appModule);
+        assembler.createApplication(appInfo, classLoader);
+        LOGGER.debug("EJB deployed");
+    }
+
+    private void addWebservices(WsModule wsModule) throws OpenEJBException {
+        // get location of webservices.xml file
+        Object webservicesObject = wsModule.getAltDDs().get("webservices.xml");
+        if (!(webservicesObject instanceof URL)) {
+            return;
+        }
+        URL webservicesUrl = (URL) webservicesObject;
+
+        // determine the base url for this module (either file: or jar:)
+        URL moduleUrl = null;
+        try {
+            File jarFile = new File(wsModule.getJarLocation());
+            moduleUrl = jarFile.toURL();
+            if (jarFile.isFile()) {
+                moduleUrl = new URL("jar", "", -1, moduleUrl + "!/");
+            }
+        } catch (MalformedURLException e) {
+            LOGGER.warn("Invalid module location " + wsModule.getJarLocation());
+            return;
+        }
+
+        // parse the webservices.xml file
+        Map<URL,JavaWsdlMapping> jaxrpcMappingCache = new HashMap<URL,JavaWsdlMapping>();
+        Webservices webservices = ReadDescriptors.readWebservices(webservicesUrl);
+        wsModule.setWebservices(webservices);
+        if (webservicesUrl != null && "file".equals(webservicesUrl.getProtocol())) {
+            wsModule.getWatchedResources().add(webservicesUrl.getPath());
+        }
+
+        // parse any jaxrpc-mapping-files mentioned in the webservices.xml file
+        for (WebserviceDescription webserviceDescription : webservices.getWebserviceDescription()) {
+            String jaxrpcMappingFile = webserviceDescription.getJaxrpcMappingFile();
+            if (jaxrpcMappingFile != null) {
+                URL jaxrpcMappingUrl = null;
+                try {
+                    jaxrpcMappingUrl = new URL(moduleUrl, jaxrpcMappingFile);
+                    JavaWsdlMapping jaxrpcMapping = jaxrpcMappingCache.get(jaxrpcMappingUrl);
+                    if (jaxrpcMapping == null) {
+                        jaxrpcMapping = ReadDescriptors.readJaxrpcMapping(jaxrpcMappingUrl);
+                        jaxrpcMappingCache.put(jaxrpcMappingUrl, jaxrpcMapping);
+                    }
+                    webserviceDescription.setJaxrpcMapping(jaxrpcMapping);
+                    if (jaxrpcMappingUrl != null && "file".equals(jaxrpcMappingUrl.getProtocol())) {
+                        wsModule.getWatchedResources().add(jaxrpcMappingUrl.getPath());
+                    }
+                } catch (MalformedURLException e) {
+                    LOGGER.warn("Invalid jaxrpc-mapping-file location " + jaxrpcMappingFile);
+                }
+            }
+        }
+
+    }
+
+    private void addPersistenceUnits(AppModule appModule, ClassLoader classLoader, URL... urls) {
+        try {
+            ResourceFinder finder = new ResourceFinder("", classLoader, urls);
+            List<URL> persistenceUrls = finder.findAll("META-INF/persistence.xml");
+            appModule.getAltDDs().put("persistence.xml", persistenceUrls);
+        } catch (IOException e) {
+            LOGGER.warn("Cannot load persistence-units from 'META-INF/persistence.xml' : " + e.getMessage(), e);
+        }
+    }
+
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Log4jLogStreamFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Log4jLogStreamFactory.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Log4jLogStreamFactory.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/Log4jLogStreamFactory.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,37 @@
+/*
+ * 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.ejb3.deployer;
+
+import org.apache.openejb.util.Log4jLogStream;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.LogStream;
+import org.apache.openejb.util.LogStreamFactory;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Jan 25, 2008
+ * Time: 3:59:25 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class Log4jLogStreamFactory implements LogStreamFactory {
+
+    public LogStream createLogStream(LogCategory logCategory) {
+        return new Log4jLogStream(logCategory);
+    }
+
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/MyEjbWsContainer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/MyEjbWsContainer.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/MyEjbWsContainer.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/MyEjbWsContainer.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,27 @@
+package org.apache.servicemix.ejb3.deployer;
+
+import org.apache.openejb.server.cxf.ejb.EjbWsContainer;
+import org.apache.openejb.server.httpd.HttpRequest;
+import org.apache.openejb.server.httpd.HttpResponse;
+import org.apache.openejb.core.webservices.PortData;
+import org.apache.openejb.DeploymentInfo;
+import org.apache.cxf.Bus;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Jan 28, 2008
+ * Time: 3:39:45 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class MyEjbWsContainer extends EjbWsContainer {
+
+    public MyEjbWsContainer(Bus bus, PortData port, DeploymentInfo deploymentInfo) {
+        super(bus, port, deploymentInfo);
+    }
+
+    public void onMessage(HttpRequest request, HttpResponse response) throws Exception {
+        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());        
+        super.onMessage(request, response);
+    }
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OpenEjbFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OpenEjbFactory.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OpenEjbFactory.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OpenEjbFactory.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,161 @@
+/*
+ * 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.ejb3.deployer;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import javax.transaction.TransactionManager;
+
+import org.apache.openejb.OpenEJB;
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.assembler.classic.Assembler;
+import org.apache.openejb.assembler.classic.SecurityServiceInfo;
+import org.apache.openejb.assembler.classic.TransactionServiceInfo;
+import org.apache.openejb.assembler.classic.OpenEjbConfiguration;
+import org.apache.openejb.assembler.dynamic.PassthroughFactory;
+import org.apache.openejb.core.ServerFederation;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.ri.sp.PseudoSecurityService;
+import org.apache.openejb.server.ServerService;
+import org.apache.openejb.server.ServiceManager;
+import org.apache.openejb.server.SelfManaging;
+import org.apache.openejb.server.ServiceLogger;
+import org.apache.openejb.server.ServiceAccessController;
+import org.apache.openejb.server.ServiceDaemon;
+import org.apache.openejb.server.webservices.WsRegistry;
+import org.apache.openejb.spi.ApplicationServer;
+import org.apache.openejb.spi.ContainerSystem;
+import org.apache.openejb.spi.SecurityService;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
+import org.apache.openejb.util.Messages;
+
+/**
+ * Factory for OpenEJB to intitialize everything.
+ *
+ */
+public class OpenEjbFactory {
+
+    private static Messages messages = new Messages("org.apache.openejb.util.resources");
+
+    private Properties properties;
+    private TransactionManager transactionManager;
+    private WsRegistry wsRegistry;
+    private SecurityService securityService;
+    private List<ServerService> serverServices;
+
+    static {
+        System.setProperty("openejb.log.factory", Log4jLogStreamFactory.class.getName());
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+
+    public void setTransactionManager(TransactionManager transactionManager) {
+        this.transactionManager = transactionManager;
+    }
+
+    public void setWsRegistry(WsRegistry wsRegistry) {
+        this.wsRegistry = wsRegistry;
+    }
+
+    public void setSecurityService(SecurityService securityService) {
+        this.securityService = securityService;
+    }
+
+    public void setServerServices(List<ServerService> serverServices) {
+        List<ServerService> services = new ArrayList<ServerService>();
+        for (ServerService service : serverServices) {
+            if (!(service instanceof SelfManaging)) {
+                service = new ServiceLogger(service);
+                service = new ServiceAccessController(service);
+                service = new ServiceDaemon(service);
+            }
+            services.add(service);
+        }
+        this.serverServices = services;
+    }
+
+    public void init() throws Exception {
+        Logger logger = Logger.getInstance(LogCategory.OPENEJB_STARTUP, "org.apache.openejb.util.resources");
+
+        if (properties == null) {
+            properties = new Properties();
+        }
+
+        try {
+            SystemInstance.init(properties);
+        } catch (Exception e) {
+            throw new OpenEJBException(e);
+        }
+        SystemInstance system = SystemInstance.get();
+
+        ApplicationServer appServer = new ServerFederation();
+        system.setComponent(ApplicationServer.class, appServer);
+
+        Assembler assembler = new Assembler();
+        SystemInstance.get().setComponent(org.apache.openejb.spi.Assembler.class, assembler);
+
+        ContainerSystem containerSystem = assembler.getContainerSystem();
+        if (containerSystem == null) {
+            String msg = messages.message("startup.assemblerReturnedNullContainer");
+            logger.fatal(msg);
+            throw new OpenEJBException(msg);
+        }
+        system.setComponent(ContainerSystem.class, containerSystem);
+
+        if (securityService == null) {
+            securityService = new PseudoSecurityService();
+        }
+        if (securityService != null) {
+            SecurityServiceInfo securityServiceInfo = new SecurityServiceInfo();
+            PassthroughFactory.add(securityServiceInfo, securityService);
+            securityServiceInfo.id = "Default Security Service";
+            securityServiceInfo.service = "SecurityService";
+            assembler.createSecurityService(securityServiceInfo);
+            system.setComponent(SecurityService.class, securityService);
+        }
+
+        if (transactionManager != null) {
+            TransactionServiceInfo transactionServiceInfo = new TransactionServiceInfo();
+            PassthroughFactory.add(transactionServiceInfo, transactionManager);
+            transactionServiceInfo.id = "Default Transaction Manager";
+            transactionServiceInfo.service = "TransactionManager";
+            assembler.createTransactionManager(transactionServiceInfo);
+        }
+
+        if (wsRegistry != null) {
+            System.out.println("Using WSRegistry: " + wsRegistry);
+            SystemInstance.get().setComponent(WsRegistry.class, wsRegistry);
+        }
+
+        OpenEjbConfiguration conf = SystemInstance.get().getComponent(OpenEjbConfiguration.class);
+        for (ServerService service : serverServices) {
+            service.start();
+        }
+    }
+
+    public void destroy() throws Exception {
+        for (ServerService service : serverServices) {
+            service.stop();
+        }
+        OpenEJB.destroy();
+    }
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiDeployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiDeployer.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiDeployer.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiDeployer.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,57 @@
+/*
+ * 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.ejb3.deployer;
+
+import java.net.URL;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.openejb.config.ConfigurationFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.springframework.osgi.util.BundleDelegatingClassLoader;
+
+/**
+ * 
+ */
+public class OsgiDeployer extends AbstractBundleWatcher {
+
+    private static final Log LOGGER = LogFactory.getLog(OsgiDeployer.class);
+
+    private Deployer deployer = new Deployer();
+
+    protected void register(Bundle bundle) {
+        try {
+            Thread.currentThread().setContextClassLoader(ConfigurationFactory.class.getClassLoader());
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("Checking bundle: " + bundle.getSymbolicName());
+            }
+
+            ClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(
+                                            bundle, BundleContext.class.getClassLoader());
+            deployer.deploy(classLoader, bundle.getLocation());
+        } 
+        catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    protected void unregister(Bundle bundle) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+}
\ No newline at end of file

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiWsRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiWsRegistry.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiWsRegistry.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/java/org/apache/servicemix/ejb3/deployer/OsgiWsRegistry.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,71 @@
+/*
+ * 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.ejb3.deployer;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.openejb.server.httpd.HttpListener;
+import org.apache.openejb.server.webservices.WsRegistry;
+import org.apache.openejb.server.webservices.WsServlet;
+import org.osgi.service.http.HttpService;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Nov 14, 2007
+ * Time: 11:59:12 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class OsgiWsRegistry implements WsRegistry {
+
+    private HttpService httpService;
+
+    public void setHttpService(HttpService httpService) {
+        this.httpService = httpService;
+    }
+
+    public List<String> setWsContainer(String virtualHost, String contextRoot, String servletName, HttpListener wsContainer) throws Exception {
+        // TODO: implement
+        System.out.println("OsgiWsRegistry:setWsContainer");
+        return null;
+    }
+
+    public void clearWsContainer(String virtualHost, String contextRoot, String servletName) {
+        // TODO: implement
+        System.out.println("OsgiWsRegistry:clearWsContainer");
+    }
+
+    public List<String> addWsContainer(String path, HttpListener httpListener, String virtualHost, String realmName, String transportGuarantee, String authMethod, ClassLoader classLoader) throws Exception {
+        System.out.println("OsgiWsRegistry:addWsContainer");
+        if (path == null) throw new NullPointerException("contextRoot is null");
+        if (httpListener == null) throw new NullPointerException("httpListener is null");
+
+        // assure context root with a leading slash
+        if (!path.startsWith("/")) path = "/" + path;
+
+        httpService.registerServlet(path, new WsServlet(httpListener), null, httpService.createDefaultHttpContext());
+
+        // TODO: return a correct list
+        return Arrays.asList("http://localhost" + path);
+    }
+
+    public void removeWsContainer(String path) {
+        System.out.println("OsgiWsRegistry:removeWsContainer");
+        httpService.unregister(path);
+    }
+}

Modified: servicemix/smx4/features/trunk/ejb3/deployer/src/main/resources/META-INF/spring/openejb-spring.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/main/resources/META-INF/spring/openejb-spring.xml?rev=616297&r1=615143&r2=616297&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/main/resources/META-INF/spring/openejb-spring.xml (original)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/main/resources/META-INF/spring/openejb-spring.xml Tue Jan 29 05:10:47 2008
@@ -20,7 +20,6 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:osgi="http://www.springframework.org/schema/osgi"
-       xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
        xmlns:util="http://www.springframework.org/schema/util"
        xsi:schemaLocation="
   http://www.springframework.org/schema/beans
@@ -28,12 +27,10 @@
   http://www.springframework.org/schema/util
   http://www.springframework.org/schema/util/spring-util.xsd
   http://www.springframework.org/schema/osgi
-  http://www.springframework.org/schema/osgi/spring-osgi.xsd
-  http://www.springframework.org/schema/osgi-compendium
-  http://www.springframework.org/schema/osgi/spring-osgi-compendium.xsd">
+  http://www.springframework.org/schema/osgi/spring-osgi.xsd">
 
     <!-- OpenEJB factory that will initialize the EJB container -->
-    <bean id="openEjb" class="org.apache.servicemix.openejb.OpenEjbFactory">
+    <bean id="openEjb" class="org.apache.servicemix.ejb3.deployer.OpenEjbFactory" init-method="init" destroy-method="destroy">
         <property name="properties">
             <props>
                 
@@ -41,21 +38,31 @@
         </property>
         <property name="transactionManager" ref="transactionManager" />
         <property name="wsRegistry" ref="wsRegistry" />
+        <property name="serverServices">
+            <list>
+                <bean class="org.apache.servicemix.ejb3.deployer.CxfService">
+                    <property name="authMethod" value="NONE" />
+                    <property name="transportGuarantee" value="NONE" />
+                </bean>
+            </list>
+        </property>
     </bean>
 
     <!-- The EJB deployer -->
-    <bean id="osgiDeployer" class="org.apache.servicemix.openejb.OsgiDeployer" />
+    <bean id="osgiDeployer" class="org.apache.servicemix.ejb3.deployer.OsgiDeployer" />
 
     <!-- Web service registry based on the OSGi HTTP service -->
-    <bean id="wsRegistry" class="org.apache.servicemix.openejb.OsgiWsRegistry">
+    <bean id="wsRegistry" class="org.apache.servicemix.ejb3.deployer.OsgiWsRegistry">
         <property name="httpService" ref="httpService" />
     </bean>
 
     <!-- Reference to the transaction manager -->
     <osgi:reference id="transactionManager"
-                    interface="javax.transaction.TransactionManager" />
+                    interface="javax.transaction.TransactionManager"
+             cardinality="0..1" />
 
     <!-- Reference to the OSGi http service -->
     <osgi:reference id="httpService"
-                    interface="org.osgi.service.http.HttpService" />
+                    interface="org.osgi.service.http.HttpService"
+            cardinality="0..1" />
 </beans>

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyService.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyService.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyService.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyService.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,21 @@
+package org.apache.servicemix.ejb3.deployer;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Nov 14, 2007
+ * Time: 7:37:05 PM
+ * To change this template use File | Settings | File Templates.
+ */
+@WebService
+@Stateless
+public class MyService implements MyServiceItf {
+
+    public String hello(String msg) {
+        return "Hello " + msg + "!";
+    }
+
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyServiceItf.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyServiceItf.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyServiceItf.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/MyServiceItf.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,17 @@
+package org.apache.servicemix.ejb3.deployer;
+
+import javax.jws.WebService;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Jan 29, 2008
+ * Time: 10:02:18 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@WebService
+public interface MyServiceItf {
+
+    String hello(String ms);
+
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/Test.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/Test.java?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/Test.java (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/test/java/org/apache/servicemix/ejb3/deployer/Test.java Tue Jan 29 05:10:47 2008
@@ -0,0 +1,65 @@
+package org.apache.servicemix.ejb3.deployer;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.List;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+
+import junit.framework.TestCase;
+import org.apache.openejb.server.ServerService;
+import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.http.NamespaceException;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Nov 14, 2007
+ * Time: 12:31:55 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class Test extends TestCase {
+
+    public void test() throws Exception {
+        System.setProperty("openejb.deployments.classpath", "false");
+
+        final List<String> servlets = new ArrayList<String>();
+        HttpService http = new HttpService() {
+            public void registerServlet(String s, Servlet servlet, Dictionary dictionary, HttpContext httpContext) throws ServletException, NamespaceException {
+                servlets.add(s);
+            }
+            public void registerResources(String s, String s1, HttpContext httpContext) throws NamespaceException {
+            }
+            public void unregister(String s) {
+            }
+            public HttpContext createDefaultHttpContext() {
+                return null;
+            }
+        };
+
+        OsgiWsRegistry registry = new OsgiWsRegistry();
+        registry.setHttpService(http);;
+        OpenEjbFactory factory = new OpenEjbFactory();
+        factory.setWsRegistry(registry);
+        List<ServerService> services = new ArrayList<ServerService>();
+        CxfService svc = new CxfService();
+        services.add(svc);
+        factory.setServerServices(services);
+        factory.init();
+
+        File f = new File("target/test-classes");
+        URL url = f.getAbsoluteFile().toURL();
+        URLClassLoader cl = new URLClassLoader(new URL[] {url}, Test.class.getClassLoader());
+        System.out.println(url.toString());
+        //new Deployer().deploy(cl, null);
+        new Deployer().deploy(cl, url.toString());
+
+        assertEquals(1, servlets.size());
+    }
+
+}

Added: servicemix/smx4/features/trunk/ejb3/deployer/src/test/resources/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/deployer/src/test/resources/META-INF/MANIFEST.MF?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/deployer/src/test/resources/META-INF/MANIFEST.MF (added)
+++ servicemix/smx4/features/trunk/ejb3/deployer/src/test/resources/META-INF/MANIFEST.MF Tue Jan 29 05:10:47 2008
@@ -0,0 +1,5 @@
+Bundle-Version: 1.0.0.SNAPSHOT
+Bundle-ManifestVersion: 2
+Manifest-Version: 1.0
+Import-Package: javax.ejb,javax.jws
+Bundle-SymbolicName: test

Added: servicemix/smx4/features/trunk/ejb3/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/ejb3/pom.xml?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/ejb3/pom.xml (added)
+++ servicemix/smx4/features/trunk/ejb3/pom.xml Tue Jan 29 05:10:47 2008
@@ -0,0 +1,42 @@
+<?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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix.features</groupId>
+        <artifactId>features</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.ejb3</groupId>
+    <artifactId>ejb3</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0-SNAPSHOT</version>
+    <name>ServiceMix EJB3 Support</name>
+
+    <modules>
+        <module>bundles</module>
+        <module>deployer</module>
+    </modules>
+
+</project>

Modified: servicemix/smx4/features/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/pom.xml?rev=616297&r1=616296&r2=616297&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/pom.xml (original)
+++ servicemix/smx4/features/trunk/pom.xml Tue Jan 29 05:10:47 2008
@@ -34,9 +34,11 @@
   <name>Apache ServiceMix Features</name>
 
   <modules>
+    <module>transaction</module>
     <module>activemq</module>
     <module>camel</module>
     <module>war</module>
+    <module>ejb3</module>
     <module>assembly</module>
   </modules>
 
@@ -73,25 +75,39 @@
       <felix.osgi.version>1.0.0</felix.osgi.version>
       <felix.plugin.version>1.1.0-r605854</felix.plugin.version>
       <geronimo.activation.version>1.0.1</geronimo.activation.version>
+      <geronimo.annotation.version>1.1.1-SNAPSHOT</geronimo.annotation.version>
+      <geronimo.ejb3.version>1.0.1-SNAPSHOT</geronimo.ejb3.version>
+      <geronimo.interceptor.version>1.0.1-SNAPSHOT</geronimo.interceptor.version>
+      <geronimo.jacc.version>1.0.1-SNAPSHOT</geronimo.jacc.version>
+      <geronimo.javamail.version>1.2</geronimo.javamail.version>
+      <geronimo.jaxrpc.version>2.0-SNAPSHOT</geronimo.jaxrpc.version>
+      <geronimo.j2ee.connector.version>2.0-SNAPSHOT</geronimo.j2ee.connector.version>
       <geronimo.j2ee.management.version>1.0.1-SNAPSHOT</geronimo.j2ee.management.version>
       <geronimo.jms.version>1.1.1-SNAPSHOT</geronimo.jms.version>
       <geronimo.jta.version>1.1.1-SNAPSHOT</geronimo.jta.version>
+      <geronimo.jpa.version>1.1.1-SNAPSHOT</geronimo.jpa.version>
+      <geronimo.saaj.version>1.0-SNAPSHOT</geronimo.saaj.version>
       <geronimo.servlet.version>1.1.1</geronimo.servlet.version>
       <geronimo.stax.version>1.0.1</geronimo.stax.version>
-      <geronimo.transaction.version>2.0.1</geronimo.transaction.version>
-      <geronimo.connector.version>2.0.1</geronimo.connector.version>
+      <geronimo.wsmetadata.version>1.1.2-SNAPSHOT</geronimo.wsmetadata.version>
+      <geronimo.transaction.version>2.2-SNAPSHOT</geronimo.transaction.version>
+      <geronimo.connector.version>2.2-SNAPSHOT</geronimo.connector.version>
       <howl.version>1.0.1-1</howl.version>
       <jasper.version>6.0.14</jasper.version>
       <jaxb.api.version>2.0</jaxb.api.version>
       <jaxb.impl.version>2.0.3</jaxb.impl.version>
+      <jaxws.api.version>2.0</jaxws.api.version>
       <jencks.version>2.1</jencks.version>
       <jline.version>0.9.93</jline.version>
       <junit.version>4.4</junit.version>
       <log4j.version>1.2.14</log4j.version>
       <mina.version>1.1.6-r602102</mina.version>
+      <openejb.version>3.0.0-SNAPSHOT</openejb.version>
+      <openjpa.version>1.0.1</openjpa.version>
       <pax.logging.version>1.0-RC2</pax.logging.version>
       <pax.runner.version>0.5.5</pax.runner.version>
-      <servicemix.kernel.version>1.0-m1-SNAPSHOT</servicemix.kernel.version>
+      <pax.web.version>0.3.0-SNAPSHOT</pax.web.version>
+      <servicemix.kernel.version>1.0-m2-SNAPSHOT</servicemix.kernel.version>
       <servicemix.nmr.version>1.0-SNAPSHOT</servicemix.nmr.version>
       <spring.version>2.5</spring.version>
       <spring.osgi.version>1.0-rc2</spring.osgi.version>

Propchange: servicemix/smx4/features/trunk/transaction/bundles/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan 29 05:10:47 2008
@@ -0,0 +1,9 @@
+target
+*.iml
+*.ipr
+*.iws
+.classpath
+.project
+.settings
+
+

Propchange: servicemix/smx4/features/trunk/transaction/bundles/howl/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan 29 05:10:47 2008
@@ -0,0 +1,9 @@
+target
+*.iml
+*.ipr
+*.iws
+.classpath
+.project
+.settings
+
+

Added: servicemix/smx4/features/trunk/transaction/bundles/howl/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/transaction/bundles/howl/pom.xml?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/transaction/bundles/howl/pom.xml (added)
+++ servicemix/smx4/features/trunk/transaction/bundles/howl/pom.xml Tue Jan 29 05:10:47 2008
@@ -0,0 +1,57 @@
+<?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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix.transaction.bundles</groupId>
+        <artifactId>bundles</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.bundles</groupId>
+    <artifactId>org.apache.servicemix.bundles.howl-1.0.1-1</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
+    <description>
+        This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
+    </description>
+
+    <properties>
+        <pkgArtifactId>howl</pkgArtifactId>
+        <pkgVersion>1.0.1-1</pkgVersion>
+        <servicemix.osgi.export.pkg>org.objectweb.howl</servicemix.osgi.export.pkg>
+        <servicemix.osgi.import.pkg>
+            *
+        </servicemix.osgi.import.pkg>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.objectweb.howl</groupId>
+            <artifactId>${pkgArtifactId}</artifactId>
+            <version>${pkgVersion}</version>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+</project>

Propchange: servicemix/smx4/features/trunk/transaction/bundles/jencks/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan 29 05:10:47 2008
@@ -0,0 +1,9 @@
+target
+*.iml
+*.ipr
+*.iws
+.classpath
+.project
+.settings
+
+

Added: servicemix/smx4/features/trunk/transaction/bundles/jencks/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/transaction/bundles/jencks/pom.xml?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/transaction/bundles/jencks/pom.xml (added)
+++ servicemix/smx4/features/trunk/transaction/bundles/jencks/pom.xml Tue Jan 29 05:10:47 2008
@@ -0,0 +1,67 @@
+<?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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix.transaction.bundles</groupId>
+        <artifactId>bundles</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.bundles</groupId>
+    <artifactId>org.apache.servicemix.bundles.jencks-2.1</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>ServiceMix OSGI Common Bundles: ${pkgArtifactId}</name>
+    <description>
+        This bundle simply wraps ${pkgArtifactId}-${pkgVersion}.jar.
+    </description>
+
+    <properties>
+        <pkgArtifactId>jencks</pkgArtifactId>
+        <pkgVersion>2.1</pkgVersion>
+        <servicemix.osgi.export.pkg>org.jencks</servicemix.osgi.export.pkg>
+        <servicemix.osgi.import.pkg>
+            org.aopalliance*;resolution:=optional,
+            org.apache.commons.pool*;resolution:=optional,
+            org.enhydra*;resolution:=optional,
+            org.tranql.connector*;resolution:=optional,
+            *
+        </servicemix.osgi.import.pkg>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.jencks</groupId>
+            <artifactId>${pkgArtifactId}</artifactId>
+            <version>${pkgVersion}</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+            <version>${geronimo.j2ee.connector.version}</version>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+</project>

Added: servicemix/smx4/features/trunk/transaction/bundles/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/transaction/bundles/pom.xml?rev=616297&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/transaction/bundles/pom.xml (added)
+++ servicemix/smx4/features/trunk/transaction/bundles/pom.xml Tue Jan 29 05:10:47 2008
@@ -0,0 +1,72 @@
+<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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix.transaction</groupId>
+        <artifactId>transaction</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.transaction.bundles</groupId>
+    <artifactId>bundles</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0-SNAPSHOT</version>
+    <name>ServiceMix OSGI Common Bundles</name>
+
+    <modules>
+        <module>howl</module>
+        <module>jencks</module>
+    </modules>
+
+    <properties>
+        <servicemix.osgi.export>${servicemix.osgi.export.pkg}*;version=${pkgVersion}</servicemix.osgi.export>
+        <servicemix.osgi.export.pkg />
+        <servicemix.osgi.import.pkg />
+        <servicemix.osgi.private.pkg />
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Export-Package>${servicemix.osgi.export}</Export-Package>
+                        <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
+                        <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
+                    </instructions>
+                    <unpackBundle>true</unpackBundle>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

Modified: servicemix/smx4/features/trunk/transaction/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/transaction/pom.xml?rev=616297&r1=616296&r2=616297&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/transaction/pom.xml (original)
+++ servicemix/smx4/features/trunk/transaction/pom.xml Tue Jan 29 05:10:47 2008
@@ -34,6 +34,7 @@
     <name>ServiceMix Features :: Transaction</name> 
 
     <modules>
+        <module>bundles</module>
         <module>transaction</module>
     </modules>
 

Modified: servicemix/smx4/features/trunk/transaction/transaction/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/transaction/transaction/pom.xml?rev=616297&r1=616296&r2=616297&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/transaction/transaction/pom.xml (original)
+++ servicemix/smx4/features/trunk/transaction/transaction/pom.xml Tue Jan 29 05:10:47 2008
@@ -99,72 +99,14 @@
                     <instructions>
                         <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                         <Import-Package>
-                            javax.transaction*,
-                            javax.jms*;resolution:=optional,
-                            org.tranql.connector*;resolution:=optional,
-                            org.apache.commons.pool*;resolution:=optional,
-                            org.enhydra.jdbc*;resolution:=optional,
-                            *
+                            javax.transaction,
+                            org.jencks.factory
                         </Import-Package>
-                        <DynamicImport-Package>*</DynamicImport-Package>
-                        <Private-Package>
-                            org.apache.geronimo.transaction*,
-                            org.apache.geronimo.connector*,
-                            org.objectweb.howl*,
-                            org.jencks*,
-                        </Private-Package>
                         <Export-Package>
-                        	org.apache.geronimo.transaction*
                         </Export-Package>
                         <Spring-Context>*;publish-context:=false</Spring-Context>
                     </instructions>
                 </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>exec-maven-plugin</artifactId>
-                <configuration>
-                    <includeProjectDependencies>false</includeProjectDependencies>
-                    <includePluginDependencies>true</includePluginDependencies>
-                    <executableDependency>
-                        <groupId>org.ops4j.pax.runner</groupId>
-                        <artifactId>pax-runner</artifactId>
-                    </executableDependency>
-                    <mainClass>org.ops4j.pax.runner.Run</mainClass>
-                    <arguments>
-                        <argument>--vmOptions=-Dbundles.configuration.location=${basedir}/src/test/configs</argument>
-                        <argument>--console</argument>
-                        <argument>mvn:org.apache.felix/org.apache.felix.configadmin/0.9.0-SNAPSHOT</argument>
-                        <argument>mvn:org.ops4j.pax.confman/pax-confman-propsloader/0.3.0-SNAPSHOT</argument>
-                        <argument>mvn:org.ops4j.pax.logging/pax-logging-api/0.9.7-SNAPSHOT</argument>
-                        <argument>mvn:org.ops4j.pax.logging/pax-logging-service/0.9.7-SNAPSHOT</argument>
-                        <argument>mvn:org.springframework.osgi/spring-osgi-core/${spring.osgi.version}</argument>
-                        <argument>mvn:org.springframework.osgi/spring-osgi-extender/${spring.osgi.version}</argument>
-                        <argument>mvn:org.springframework.osgi/spring-osgi-io/${spring.osgi.version}</argument>
-                        <argument>mvn:org.springframework/spring-aop/${spring.version}</argument>
-                        <argument>mvn:org.springframework/spring-beans/${spring.version}</argument>
-                        <argument>mvn:org.springframework/spring-context/${spring.version}</argument>
-                        <argument>mvn:org.springframework/spring-core/${spring.version}</argument>
-                        <argument>mvn:org.springframework/spring-tx/${spring.version}</argument>
-                        <argument>
-                            mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0-${project.version}
-                        </argument>
-                        <argument>
-                            mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/2.1_3-${project.version}
-                        </argument>
-                        <argument>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1-SNAPSHOT</argument>
-                        <argument>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0-SNAPSHOT</argument>
-                        <argument>mvn:org.apache.servicemix/org.apache.servicemix.transaction/${project.version}
-                        </argument>
-                    </arguments>
-                </configuration>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.ops4j.pax.runner</groupId>
-                        <artifactId>pax-runner</artifactId>
-                        <version>0.5.1</version>
-                    </dependency>
-                </dependencies>
             </plugin>
         </plugins>
     </build>

Modified: servicemix/smx4/features/trunk/transaction/transaction/src/main/resources/META-INF/spring/servicemix-tx.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/transaction/transaction/src/main/resources/META-INF/spring/servicemix-tx.xml?rev=616297&r1=616296&r2=616297&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/transaction/transaction/src/main/resources/META-INF/spring/servicemix-tx.xml (original)
+++ servicemix/smx4/features/trunk/transaction/transaction/src/main/resources/META-INF/spring/servicemix-tx.xml Tue Jan 29 05:10:47 2008
@@ -30,7 +30,7 @@
   http://www.springframework.org/schema/osgi
   http://www.springframework.org/schema/osgi/spring-osgi.xsd
   http://www.springframework.org/schema/osgi-compendium
-  http://www.springframework.org/schema/osgi/spring-osgi-compendium.xsd">
+  http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd">
 
     <!-- Transaction Manager -->
     <bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean">



Mime
View raw message