Commit a86ce5ef authored by Nicolas Tachker's avatar Nicolas Tachker

JORAM-244: Update OSGi, felix and gogo version.

parent e3ee6530
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.osgi</groupId> <groupId>org.osgi</groupId>
<artifactId>org.osgi</artifactId> <artifactId>org.osgi.core</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -88,7 +88,7 @@ public class A3ManagedService extends CommonService implements ManagedService { ...@@ -88,7 +88,7 @@ public class A3ManagedService extends CommonService implements ManagedService {
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedService.class.getName(), ManagedService.class.getName(),
this, this,
props); (Dictionary)props);
} }
protected void doStop() { protected void doStop() {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -98,7 +98,7 @@ public class CommonService { ...@@ -98,7 +98,7 @@ public class CommonService {
bundleContext.registerService( bundleContext.registerService(
ServerDesc.class.getName(), ServerDesc.class.getName(),
serverDesc, serverDesc,
props); (Dictionary)props);
if (logmon.isLoggable(BasicLevel.DEBUG)) if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.DEBUG, "CommonService ServerDesc register: " + serverDesc); logmon.log(BasicLevel.DEBUG, "CommonService ServerDesc register: " + serverDesc);
} }
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -89,7 +89,7 @@ public class JoramManagedService extends CommonService implements ManagedService ...@@ -89,7 +89,7 @@ public class JoramManagedService extends CommonService implements ManagedService
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedService.class.getName(), ManagedService.class.getName(),
this, this,
props); (Dictionary)props);
} }
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2013 ScalAgent Distributed Technologies * Copyright (C) 2013 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
package fr.dyade.aaa.jndi2.osgi; package fr.dyade.aaa.jndi2.osgi;
import java.util.Dictionary;
import java.util.Properties; import java.util.Properties;
import org.objectweb.util.monolog.api.BasicLevel; import org.objectweb.util.monolog.api.BasicLevel;
...@@ -54,7 +55,7 @@ public class Activator implements BundleActivator { ...@@ -54,7 +55,7 @@ public class Activator implements BundleActivator {
registration = context.registerService( registration = context.registerService(
javax.naming.spi.ObjectFactory.class.getName(), javax.naming.spi.ObjectFactory.class.getName(),
new scnURLContextFactory(), new scnURLContextFactory(),
props); (Dictionary)props);
} }
public void stop(BundleContext context) throws Exception { public void stop(BundleContext context) throws Exception {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2004 - 2012 ScalAgent Distributed Technologies * Copyright (C) 2004 - 2016 ScalAgent Distributed Technologies
* Copyright (C) 2004 - 2006 Bull SA * Copyright (C) 2004 - 2006 Bull SA
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -27,6 +27,7 @@ package org.objectweb.joram.client.connector; ...@@ -27,6 +27,7 @@ package org.objectweb.joram.client.connector;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.net.ConnectException; import java.net.ConnectException;
import java.util.Date; import java.util.Date;
import java.util.Dictionary;
import java.util.Properties; import java.util.Properties;
import javax.jms.Connection; import javax.jms.Connection;
...@@ -510,7 +511,7 @@ public final class JoramAdapter extends JoramResourceAdapter implements JoramAda ...@@ -510,7 +511,7 @@ public final class JoramAdapter extends JoramResourceAdapter implements JoramAda
registration = Activator.context.registerService( registration = Activator.context.registerService(
AdminItf.class.getName(), AdminItf.class.getName(),
wrapper, wrapper,
props); (Dictionary) props);
if (logger.isLoggable(BasicLevel.DEBUG)) if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Bundle context " + Activator.context + " registerService AdminWrapper " + getName()); logger.log(BasicLevel.DEBUG, "Bundle context " + Activator.context + " registerService AdminWrapper " + getName());
} }
......
/* /*
* Copyright (C) 2009 - 2013 ScalAgent Distributed Technologies * Copyright (C) 2009 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -21,11 +21,15 @@ ...@@ -21,11 +21,15 @@
*/ */
package org.objectweb.joram.client.osgi; package org.objectweb.joram.client.osgi;
import javax.naming.spi.ObjectFactory;
import org.objectweb.joram.client.jms.admin.AdminModule;
import org.objectweb.joram.client.jms.admin.JoramAdminConnect; import org.objectweb.joram.client.jms.admin.JoramAdminConnect;
import org.objectweb.util.monolog.api.BasicLevel; import org.objectweb.util.monolog.api.BasicLevel;
import org.objectweb.util.monolog.api.Logger; import org.objectweb.util.monolog.api.Logger;
import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import fr.dyade.aaa.common.Debug; import fr.dyade.aaa.common.Debug;
...@@ -38,6 +42,8 @@ public class Activator implements BundleActivator { ...@@ -38,6 +42,8 @@ public class Activator implements BundleActivator {
public static final Logger logmon = Debug.getLogger(Activator.class.getName()); public static final Logger logmon = Debug.getLogger(Activator.class.getName());
public static final String ADMIN_XML_PATH = "joram.adminXML";
private JoramAdminConnect joramAdminConnect; private JoramAdminConnect joramAdminConnect;
private DestinationMSF destMSF = null; private DestinationMSF destMSF = null;
private UserMSF userMSF = null; private UserMSF userMSF = null;
...@@ -84,6 +90,23 @@ public class Activator implements BundleActivator { ...@@ -84,6 +90,23 @@ public class Activator implements BundleActivator {
sfq = new ServiceFtpQueue(context); sfq = new ServiceFtpQueue(context);
salq = new ServiceAliasQueue(context); salq = new ServiceAliasQueue(context);
sadmin = new ServiceAdmin(context); sadmin = new ServiceAdmin(context);
ClassLoader myClassLoader = getClass().getClassLoader();
ClassLoader originalContextClassLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(myClassLoader);
String adminXmlFile = context.getProperty(ADMIN_XML_PATH);
if (adminXmlFile != null) {
ServiceReference<ObjectFactory> ref = context.getServiceReference(javax.naming.spi.ObjectFactory.class);
if (ref == null) {
if (logmon.isLoggable(BasicLevel.ERROR))
logmon.log(BasicLevel.ERROR, "No ServiceReference for javax.naming.spi.ObjectFactory, start jndi client bundle to use jndi.");
}
AdminModule.executeXMLAdmin(adminXmlFile);
}
} finally {
Thread.currentThread().setContextClassLoader(originalContextClassLoader);
}
} }
/* (non-Javadoc) /* (non-Javadoc)
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -104,7 +104,7 @@ public class ConnectionFactoryMSF implements ManagedServiceFactory { ...@@ -104,7 +104,7 @@ public class ConnectionFactoryMSF implements ManagedServiceFactory {
registration = this.bundleContext.registerService( registration = this.bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
cnxFactories = new HashMap<String, AbstractConnectionFactory>(); cnxFactories = new HashMap<String, AbstractConnectionFactory>();
jndiHelper = new JndiHelper(); jndiHelper = new JndiHelper();
jndiNames = new HashMap<String, String>(); jndiNames = new HashMap<String, String>();
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -127,7 +127,7 @@ public class DestinationMSF implements ManagedServiceFactory { ...@@ -127,7 +127,7 @@ public class DestinationMSF implements ManagedServiceFactory {
registration = this.bundleContext.registerService( registration = this.bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
destinations = new HashMap<String, Destination>(); destinations = new HashMap<String, Destination>();
jndiHelper = new JndiHelper(); jndiHelper = new JndiHelper();
jndiNames = new HashMap<String, String>(); jndiNames = new HashMap<String, String>();
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -98,7 +98,7 @@ public class ServiceAcquisitionQueue extends ServiceDestination implements Manag ...@@ -98,7 +98,7 @@ public class ServiceAcquisitionQueue extends ServiceDestination implements Manag
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
} }
public void doStop() { public void doStop() {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -98,7 +98,7 @@ public class ServiceAcquisitionTopic extends ServiceDestination implements Manag ...@@ -98,7 +98,7 @@ public class ServiceAcquisitionTopic extends ServiceDestination implements Manag
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
} }
public void doStop() { public void doStop() {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2013 ScalAgent Distributed Technologies * Copyright (C) 2013 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -116,7 +116,7 @@ public class ServiceAdmin implements ManagedServiceFactory { ...@@ -116,7 +116,7 @@ public class ServiceAdmin implements ManagedServiceFactory {
registration = this.bundleContext.registerService( registration = this.bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
wrappers = new HashMap<String, AdminItf>(); wrappers = new HashMap<String, AdminItf>();
connections = new HashMap<String, Connection>(); connections = new HashMap<String, Connection>();
} }
...@@ -232,7 +232,7 @@ public class ServiceAdmin implements ManagedServiceFactory { ...@@ -232,7 +232,7 @@ public class ServiceAdmin implements ManagedServiceFactory {
registration = bundleContext.registerService( registration = bundleContext.registerService(
AdminItf.class.getName(), AdminItf.class.getName(),
wrapper, wrapper,
props); (Dictionary)props);
if (logmon.isLoggable(BasicLevel.DEBUG)) if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.DEBUG, "doUpdated registration = " + registration); logmon.log(BasicLevel.DEBUG, "doUpdated registration = " + registration);
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -94,7 +94,7 @@ public class ServiceAliasQueue extends ServiceDestination implements ManagedServ ...@@ -94,7 +94,7 @@ public class ServiceAliasQueue extends ServiceDestination implements ManagedServ
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
} }
public void doStop() { public void doStop() {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 - 2013 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -103,7 +103,7 @@ public class ServiceConnectionFactory implements ManagedServiceFactory { ...@@ -103,7 +103,7 @@ public class ServiceConnectionFactory implements ManagedServiceFactory {
registration = this.bundleContext.registerService( registration = this.bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
cnxFactories = new HashMap<String, AbstractConnectionFactory>(); cnxFactories = new HashMap<String, AbstractConnectionFactory>();
jndiHelper = new JndiHelper(); jndiHelper = new JndiHelper();
jndiNames = new HashMap<String, String>(); jndiNames = new HashMap<String, String>();
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 - 2013 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -303,12 +303,12 @@ public abstract class ServiceDestination { ...@@ -303,12 +303,12 @@ public abstract class ServiceDestination {
reg = bundleContext.registerService( reg = bundleContext.registerService(
javax.jms.Queue.class.getName(), javax.jms.Queue.class.getName(),
dest, dest,
props); (Dictionary)props);
else else
reg = bundleContext.registerService( reg = bundleContext.registerService(
javax.jms.Topic.class.getName(), javax.jms.Topic.class.getName(),
dest, dest,
props); (Dictionary)props);
registrations.put(pid, reg); registrations.put(pid, reg);
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -97,7 +97,7 @@ public class ServiceDistributionQueue extends ServiceDestination implements Mana ...@@ -97,7 +97,7 @@ public class ServiceDistributionQueue extends ServiceDestination implements Mana
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
} }
public void doStop() { public void doStop() {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -97,7 +97,7 @@ public class ServiceDistributionTopic extends ServiceDestination implements Mana ...@@ -97,7 +97,7 @@ public class ServiceDistributionTopic extends ServiceDestination implements Mana
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
} }
public void doStop() { public void doStop() {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -97,7 +97,7 @@ public class ServiceFtpQueue extends ServiceDestination implements ManagedServic ...@@ -97,7 +97,7 @@ public class ServiceFtpQueue extends ServiceDestination implements ManagedServic
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this, this,
props); (Dictionary)props);
} }
public void doStop() { public void doStop() {
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2012 ScalAgent Distributed Technologies * Copyright (C) 2012 - 2016 ScalAgent Distributed Technologies
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -93,7 +93,7 @@ public class ServiceQueue extends ServiceDestination implements ManagedServiceFa ...@@ -93,7 +93,7 @@ public class ServiceQueue extends ServiceDestination implements ManagedServiceFa
registration = bundleContext.registerService( registration = bundleContext.registerService(
ManagedServiceFactory.class.getName(), ManagedServiceFactory.class.getName(),
this,