diff --git a/joram/a3/common/pom.xml b/joram/a3/common/pom.xml index 0e00b450428944d5098f2602666a2351d2e81a95..641573a7dd860ce4a59661888879a5618755d443 100644 --- a/joram/a3/common/pom.xml +++ b/joram/a3/common/pom.xml @@ -32,7 +32,6 @@ fr.dyade.aaa.common.net, fr.dyade.aaa.common.osgi, fr.dyade.aaa.common.stream, - fr.dyade.aaa.common.soap, fr.dyade.aaa.util.management javax.management;resolution:=optional, org.objectweb.util.monolog, diff --git a/joram/a3/common/src/main/java/fr/dyade/aaa/common/soap/SoapObjectItf.java b/joram/a3/common/src/main/java/fr/dyade/aaa/common/soap/SoapObjectItf.java deleted file mode 100644 index 75832da697db253603c74d1a87b1d81965813bca..0000000000000000000000000000000000000000 --- a/joram/a3/common/src/main/java/fr/dyade/aaa/common/soap/SoapObjectItf.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2003 - 2008 ScalAgent Distributed Technologies - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA. - * - * Initial developer(s): Frederic Maistre (INRIA) - * Contributor(s): Nicolas Tachker (ScalAgent DT) - */ -package fr.dyade.aaa.common.soap; - -import java.util.Hashtable; - - -/** - * The SoapObjectItf interface must be implemented by any - * object which may be registered and/or retrieved to/from JNDI through the - * SOAP protocol. - */ -public interface SoapObjectItf { - /** - * Method coding the SoapObjectItf object into a Hashtable - * transportable by the SOAP procotol. - */ - public Hashtable code(); - - /** - * Initializes a SoapObjectItf object given a coded Hashtable. - */ - public void decode(Hashtable h); -} diff --git a/joram/assembly/osgi-assembly.xml b/joram/assembly/osgi-assembly.xml index a7c136faccec84ebb2d8795502f7e673f70da07c..1f72a089e7a205698da402d4b5bbb00207e42842 100644 --- a/joram/assembly/osgi-assembly.xml +++ b/joram/assembly/osgi-assembly.xml @@ -62,7 +62,6 @@ org.ow2.spec.ee:ow2-connector-1.5-spec org.ow2.jonas.osgi:monolog javax.mail:mail - soap:soap org.ow2.joram:joram-client-jca false diff --git a/joram/assembly/pom.xml b/joram/assembly/pom.xml index 355da8dffc19fd38f34549e0b31e38a79a5ef514..9b461e11c49448e94abe016e19e20c101d562f67 100644 --- a/joram/assembly/pom.xml +++ b/joram/assembly/pom.xml @@ -212,10 +212,6 @@ javax.mail mail - - soap - soap - org.ow2.joram joram-client-jca diff --git a/joram/joram/client/jms/pom.xml b/joram/joram/client/jms/pom.xml index ff0776c210a4d8c9b6a9364dc7c75d8391867997..6cd0182af66d235c4285c384a6ef9650c7bcbb84 100644 --- a/joram/joram/client/jms/pom.xml +++ b/joram/joram/client/jms/pom.xml @@ -43,7 +43,6 @@ fr.dyade.aaa.common, fr.dyade.aaa.common.net, fr.dyade.aaa.common.stream, - fr.dyade.aaa.common.soap, fr.dyade.aaa.util.management, javax.jms, javax.management;resolution:=optional, @@ -54,12 +53,6 @@ javax.transaction, javax.transaction.xa, javax.xml.parsers, - org.apache.soap;resolution:=optional, - org.apache.soap.encoding;resolution:=optional, - org.apache.soap.encoding.soapenc;resolution:=optional, - org.apache.soap.rpc;resolution:=optional, - org.apache.soap.server;resolution:=optional, - org.apache.soap.util.xml;resolution:=optional, org.objectweb.joram.mom.dest;resolution:=optional, org.objectweb.joram.mom.notifications;resolution:=optional, org.objectweb.joram.mom.proxies;resolution:=optional, @@ -92,7 +85,6 @@ org.objectweb.joram.client.jms.ha.local, org.objectweb.joram.client.jms.ha.tcp, org.objectweb.joram.client.jms.local, - org.objectweb.joram.client.jms.soap, org.objectweb.joram.client.jms.tcp, org.objectweb.joram.client.osgi * @@ -121,10 +113,6 @@ joram-mom-core ${project.version} - - soap - soap - \ No newline at end of file diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/Destination.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/Destination.java index 2460c1cdd90401f27f7685f386d556d34dda69eb..19c96e828d0202f7dc4d0b2c366dd904f15f6b77 100644 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/Destination.java +++ b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/Destination.java @@ -919,22 +919,6 @@ public abstract class Destination extends AdministeredObject implements javax.jm adminName = (String) ref.get("dest.adminName").getContent(); } - /** - * Codes a Destination as a Hashtable for travelling through the - * SOAP protocol. - */ - public Hashtable code() { - Hashtable h = new Hashtable(); - h.put("agentId", getName()); - h.put("type", new Byte(type)); - return h; - } - - public void decode(Hashtable h) { - agentId = (String) h.get("agentId"); - type = ((Byte) h.get("type")).byteValue(); - } - /** * Administration method add interceptors. * diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AbstractConnectionFactory.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AbstractConnectionFactory.java index 96331ef9501396c64e767185a054161ca3f9cdd8..410d3546ace3fad7786662dc527ff8c32384c85f 100644 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AbstractConnectionFactory.java +++ b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AbstractConnectionFactory.java @@ -523,37 +523,4 @@ public abstract class AbstractConnectionFactory extends AdministeredObject { setIdentityClassName((String) ref.get(prefix + ".identityClassName").getContent()); params.fromReference(ref, prefix); } - - /* - * SoapItf interface implementation. - */ - - /** - * Codes a ConnectionFactory as a Hashtable for traveling - * through the SOAP protocol. - */ - public Hashtable code() { - return code(new Hashtable(), "cf"); - } - - public Hashtable code(Hashtable h, String prefix) { - if (reliableClass != null) - h.put(prefix + ".reliableClass", reliableClass); - h.put(prefix + ".identityClassName", identityClassName); - return params.code(h, prefix); - } - - /** - * Implements the decode abstract method defined in the - * fr.dyade.aaa.jndi2.soap.SoapObjectItf interface. - */ - public void decode(Hashtable h) { - decode(h, "cf"); - } - - public void decode(Hashtable h, String prefix) { - reliableClass = (String) h.get(prefix + ".reliableClass"); - identityClassName = (String) h.get(prefix + ".identityClassName"); - params.decode(h, prefix); - } } diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AdministeredObject.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AdministeredObject.java index 6414decd578edc90847b29cd5a0b419b30943cb1..bf2233fd94e9478001279d94d2a7f84a3be0ce88 100644 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AdministeredObject.java +++ b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/AdministeredObject.java @@ -1,6 +1,6 @@ /* * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2007 - 2008 ScalAgent Distributed Technologies + * Copyright (C) 2007 - 2012 ScalAgent Distributed Technologies * Copyright (C) 2007 France Telecom R&D * * This library is free software; you can redistribute it and/or @@ -24,17 +24,16 @@ package org.objectweb.joram.client.jms.admin; import java.io.Serializable; + import javax.naming.NamingException; import javax.naming.Reference; -import fr.dyade.aaa.common.soap.SoapObjectItf; - /** * The AdministeredObject class is the parent class of all * JORAM administered objects. */ -public abstract class AdministeredObject implements Serializable, javax.naming.Referenceable, SoapObjectItf { +public abstract class AdministeredObject implements Serializable, javax.naming.Referenceable { /** define serialVersionUID for interoperability */ private static final long serialVersionUID = 1L; diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterConnectionFactory.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterConnectionFactory.java index 305ef383491df5e2b75407dc03ce52cbb56161d0..e3713959eaff0ef09f0d853de4a65078272fc7a1 100644 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterConnectionFactory.java +++ b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterConnectionFactory.java @@ -217,78 +217,4 @@ public class ClusterConnectionFactory extends org.objectweb.joram.client.jms.adm i++; } } - - // AF: The JNDI Soap access should translate the Reference object to - // an hashtable. - - /** - * Codes a ConnectionFactory as a Hashtable for travelling - * through the SOAP protocol. - */ - public Hashtable code() { - Hashtable h = new Hashtable(); - - if (cluster == null) return h; - Map.Entry entries[] = new Map.Entry [cluster.size()]; - cluster.entrySet().toArray(entries); - - StringBuffer strbuf = new StringBuffer(15); - for (int i=0; idecode abstract method defined in the - * fr.dyade.aaa.jndi2.soap.SoapObjectItf interface. - *

- * Actual implementation of the method is located in the - * tcp and soap sub classes. - */ - public void decode(Hashtable h) { - if (cluster == null) cluster = new Hashtable(); - - int i = 0; - StringBuffer strbuf = new StringBuffer(15); - - while (true) { - strbuf.setLength(0); - strbuf.append("CF#").append(i).append(".key"); - String key = (String) h.get(strbuf.toString()); - if (key == null) break; - - strbuf.setLength(0); - strbuf.append("CF#").append(i).append(".class"); - String classname = (String) h.get(strbuf.toString()); - try { - Class clazz = Class.forName(classname); - ConnectionFactory cf = (ConnectionFactory) clazz.newInstance(); - - strbuf.setLength(0); - strbuf.append("CF#").append(i); - cf.decode(h, strbuf.toString()); - - cluster.put(key, cf); - } catch (Exception exc) { - if (logger.isLoggable(BasicLevel.ERROR)) - logger.log(BasicLevel.ERROR, "", exc); - } - i++; - } - } - } diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterDestination.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterDestination.java index cef33a004a4cbdcac23d91396035345ac5567d95..12c506ca75f93d4bd6fb0aa7cebe1b603a38daea 100644 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterDestination.java +++ b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/ClusterDestination.java @@ -1,6 +1,6 @@ /* * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2001 - 2010 ScalAgent Distributed Technologies + * Copyright (C) 2001 - 2012 ScalAgent Distributed Technologies * Copyright (C) 2004 - 2007 France Telecom R&D * Copyright (C) 1996 - 2000 Dyade * @@ -231,56 +231,4 @@ public class ClusterDestination extends Destination { i++; } } - - /** - * Codes a ClusterDestination as a Hashtable for - * travelling through the SOAP protocol. - */ - public Hashtable code() { - Hashtable h = new Hashtable(); - - Map.Entry entries[] = new Map.Entry [cluster.size()]; - cluster.entrySet().toArray(entries); - StringBuffer strbuf = new StringBuffer(20); - - for (int i=0; i clazz = Class.forName(className); - Class[] classParams = {new String().getClass(), - Integer.TYPE, - Integer.TYPE}; - Method methode = clazz.getMethod("create", classParams); - Object[] objParams = {host, new Integer(port), new Integer(timeout)}; - obj = methode.invoke(null, objParams); - } catch (Throwable exc) { - logger.log(BasicLevel.ERROR, - "JoramSaxWrapper: Cannot instantiate " + className, exc); - throw new SAXException(exc.getMessage()); - } } else if (rawName.equals(ELT_JNDI)) { } else if (rawName.equals(ELT_SERVER)) { if (logger.isLoggable(BasicLevel.DEBUG)) diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/User.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/User.java index 2e8111e5b98ece14559a5592ab3f1f136de15911..2103f6b022d427cff455db98075cc16504aa4c1d 100644 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/User.java +++ b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/admin/User.java @@ -1,6 +1,6 @@ /* * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2004 - 2011 ScalAgent Distributed Technologies + * Copyright (C) 2004 - 2012 ScalAgent Distributed Technologies * Copyright (C) 2004 Bull SA * * This library is free software; you can redistribute it and/or @@ -822,23 +822,4 @@ public class User extends AdministeredObject implements UserMBean { name = (String) ref.get("user.name").getContent(); proxyId = (String) ref.get("user.id").getContent(); } - - /** - * Codes an User instance as a Hashtable for traveling - * through the SOAP protocol. - */ - public Hashtable code() { - Hashtable h = new Hashtable(); - h.put("name", name); - h.put("proxyId", proxyId); - return h; - } - - /** - * Decodes an User which traveled through the SOAP protocol. - */ - public void decode(Hashtable h) { - name = (String) h.get("name"); - proxyId = (String) h.get("proxyId"); - } } diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/QueueSoapConnectionFactory.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/QueueSoapConnectionFactory.java deleted file mode 100644 index 60eee4f42a9e48582ca9db5ba54cc6279f3f2bca..0000000000000000000000000000000000000000 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/QueueSoapConnectionFactory.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies - * Copyright (C) 2004 Bull SA - * Copyright (C) 1996 - 2000 Dyade - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA. - * - * Initial developer(s): Frederic Maistre (INRIA) - * Contributor(s): ScalAgent Distributed Technologies - */ -package org.objectweb.joram.client.jms.soap; - -import javax.jms.JMSException; - -import org.objectweb.joram.client.jms.ConnectionFactory; -import org.objectweb.joram.client.jms.FactoryParameters; -import org.objectweb.joram.client.jms.QueueConnectionFactory; -import org.objectweb.joram.client.jms.connection.RequestChannel; -import org.objectweb.joram.shared.security.Identity; - -/** - * A QueueSoapConnectionFactory instance is a factory of - * SOAP connections for PTP communication. - * - * @deprecated Replaced next to Joram 5.2.1 by {@link SoapConnectionFactory}. - */ -public class QueueSoapConnectionFactory extends QueueConnectionFactory { - /** define serialVersionUID for interoperability */ - private static final long serialVersionUID = 1L; - - /** - * Constructs an empty QueueSoapConnectionFactory instance. - * Needed by ObjectFactory, should only be used for internal purposes. - */ - public QueueSoapConnectionFactory() {} - - /** - * Constructs a QueueSoapConnectionFactory instance. - * - * @param host Name or IP address of the server's host. - * @param port Server's listening port. - * @param timeout Duration in seconds during which a SOAP connection might - * be inactive before being considered as dead (0 for never). - */ - private QueueSoapConnectionFactory(String host, int port, int timeout) { - super(host, port); - params.cnxPendingTimer = timeout * 1000; - } - - /** - * Creates the SoapRequestChannel object specific to the protocol used. - * - * @param params Connection configuration parameters. - * @param identity Client's identity. - * @param reliableClass The protocol specific class. - * @return The RequestChannel object specific to the protocol used. - * - * @exception JMSException A problem occurs during the connection. - * - * @see ConnectionFactory#createRequestChannel(FactoryParameters, Identity, String) - */ - protected RequestChannel createRequestChannel(FactoryParameters params, - Identity identity, - String reliableClass) throws JMSException { - return new SoapRequestChannel(params, identity); - } - - /** - * Admin method creating a javax.jms.QueueConnectionFactory - * instance for creating SOAP connections with a given server. - * - * @param host Name or IP address of the server's host. - * @param port Server's listening port. - * @param timeout Duration in seconds during which a SOAP connection might - * be inactive before being considered as dead (0 for never). - */ - public static javax.jms.QueueConnectionFactory create(String host, int port, int timeout) { - return new QueueSoapConnectionFactory(host, port, timeout); - } -} diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapConnectionFactory.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapConnectionFactory.java deleted file mode 100644 index 2c1e54a271e6793167181529953533063c02fc89..0000000000000000000000000000000000000000 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapConnectionFactory.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies - * Copyright (C) 2004 Bull SA - * Copyright (C) 1996 - 2000 Dyade - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA. - * - * Initial developer(s): Frederic Maistre (INRIA) - * Contributor(s): ScalAgent Distributed Technologies - */ -package org.objectweb.joram.client.jms.soap; - -import javax.jms.JMSException; - -import org.objectweb.joram.client.jms.ConnectionFactory; -import org.objectweb.joram.client.jms.FactoryParameters; -import org.objectweb.joram.client.jms.connection.RequestChannel; -import org.objectweb.joram.shared.security.Identity; - -/** - * A SoapConnectionFactory instance is a factory of SOAP - * connections. - */ -public class SoapConnectionFactory extends ConnectionFactory { - /** define serialVersionUID for interoperability */ - private static final long serialVersionUID = 1L; - - /** - * Constructs an empty SoapConnectionFactory instance. - * Needed by ObjectFactory, should only be used for internal purposes. - */ - public SoapConnectionFactory() {} - - /** - * Constructs a SoapConnectionFactory instance. - * - * @param host Name or IP address of the server's host. - * @param port Server's listening port. - * @param timeout Duration in seconds during which a SOAP connection might - * be inactive before being considered as dead (0 for never). - */ - private SoapConnectionFactory(String host, int port, int timeout) { - super(host, port); - params.cnxPendingTimer = timeout * 1000; - } - - /** - * Creates the SoapRequestChannel object specific to the protocol used. - * - * @param params Connection configuration parameters. - * @param identity Client's identity. - * @param reliableClass The protocol specific class. - * @return The RequestChannel object specific to the protocol used. - * - * @exception JMSException A problem occurs during the connection. - * - * @see ConnectionFactory#createRequestChannel(FactoryParameters, Identity, String) - */ - protected RequestChannel createRequestChannel(FactoryParameters params, - Identity identity, - String reliableClass) throws JMSException { - return new SoapRequestChannel(params, identity); - } - - /** - * Admin method creating a javax.jms.ConnectionFactory - * instance for creating SOAP connections with a given server. - * - * @param host Name or IP address of the server's host. - * @param port Server's listening port. - * @param timeout Duration in seconds during which a SOAP connection might - * be inactive before being considered as dead (0 for never). - */ - public static ConnectionFactory create(String host, int port, int timeout) { - return new SoapConnectionFactory(host, port, timeout); - } -} diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapRequestChannel.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapRequestChannel.java deleted file mode 100644 index 999fa7620a6ba1cc46fc75cb6d819e08b8f4e680..0000000000000000000000000000000000000000 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapRequestChannel.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies - * Copyright (C) 1996 - 2000 Dyade - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA. - * - * Initial developer(s): Frederic Maistre (INRIA) - * Contributor(s): ScalAgent Distributed Technologies - */ -package org.objectweb.joram.client.jms.soap; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Hashtable; -import java.util.Timer; -import java.util.Vector; - -import javax.jms.IllegalStateException; -import javax.jms.JMSException; -import javax.jms.JMSSecurityException; - -import org.apache.soap.Constants; -import org.apache.soap.SOAPException; -import org.apache.soap.encoding.SOAPMappingRegistry; -import org.apache.soap.encoding.soapenc.BeanSerializer; -import org.apache.soap.rpc.Call; -import org.apache.soap.rpc.Parameter; -import org.apache.soap.rpc.Response; -import org.apache.soap.util.xml.QName; -import org.objectweb.joram.client.jms.FactoryParameters; -import org.objectweb.joram.client.jms.connection.RequestChannel; -import org.objectweb.joram.shared.client.AbstractJmsMessage; -import org.objectweb.joram.shared.client.AbstractJmsReply; -import org.objectweb.joram.shared.client.AbstractJmsRequest; -import org.objectweb.joram.shared.client.CnxCloseReply; -import org.objectweb.joram.shared.client.CnxCloseRequest; -import org.objectweb.joram.shared.client.CnxConnectReply; -import org.objectweb.joram.shared.client.CnxConnectRequest; -import org.objectweb.joram.shared.client.CnxStartRequest; -import org.objectweb.joram.shared.client.CnxStopRequest; -import org.objectweb.joram.shared.client.ConsumerAckRequest; -import org.objectweb.joram.shared.client.ConsumerCloseSubRequest; -import org.objectweb.joram.shared.client.ConsumerDenyRequest; -import org.objectweb.joram.shared.client.ConsumerReceiveRequest; -import org.objectweb.joram.shared.client.ConsumerSetListRequest; -import org.objectweb.joram.shared.client.ConsumerSubRequest; -import org.objectweb.joram.shared.client.ConsumerUnsetListRequest; -import org.objectweb.joram.shared.client.ConsumerUnsubRequest; -import org.objectweb.joram.shared.client.GetAdminTopicReply; -import org.objectweb.joram.shared.client.GetAdminTopicRequest; -import org.objectweb.joram.shared.client.QBrowseRequest; -import org.objectweb.joram.shared.client.ServerReply; -import org.objectweb.joram.shared.client.SessAckRequest; -import org.objectweb.joram.shared.client.SessCreateDestReply; -import org.objectweb.joram.shared.client.SessCreateDestRequest; -import org.objectweb.joram.shared.client.SessDenyRequest; -import org.objectweb.joram.shared.client.TempDestDeleteRequest; -import org.objectweb.joram.shared.security.Identity; - -/** - * A SoapConnection links a Joram client and a Joram platform - * with HTTP connections. - *

- * Requests and replies travel through the connections in SOAP (XML) format. - */ -public class SoapRequestChannel implements RequestChannel { - /** The user's identity for authentication */ - private Identity identity; - /** The factory parameters to configure the connection */ - private FactoryParameters factParams; - - /** URL of the SOAP service this object communicates with. */ - private URL serviceUrl = null; - - /** SOAP call object for sending the requests. */ - private Call sendCall; - - private Call receiveCall; - - /** Identifier of the connection. */ - private int cnxId; - - private boolean closing = false; - - /** - * Creates a SoapConnection instance. - * - * @param params The factory parameters to configure the connection. - * @param identity The user's identity for authentication. - * - * @exception JMSSecurityException If the user identification is incorrect. - * @exception IllegalStateException If the server is not reachable. - */ - public SoapRequestChannel(FactoryParameters params, Identity identity) { - factParams = params; - this.identity = identity; - } - - public void setTimer(Timer timer) { - // No timer is useful - } - - public void connect() throws Exception { - connect(factParams, identity); - - // Building the Call object for sending the requests: - SOAPMappingRegistry mappingReg = new SOAPMappingRegistry(); - BeanSerializer beanSer = new BeanSerializer(); - - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "AbstractJmsRequest"), - AbstractJmsRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "CnxConnectRequest"), - CnxConnectRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "CnxStartRequest"), - CnxStartRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "CnxStopRequest"), - CnxStopRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "CnxCloseRequest"), - CnxCloseRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "ConsumerAckRequest"), - ConsumerAckRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "ConsumerDenyRequest"), - ConsumerDenyRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", - "ConsumerReceiveRequest"), - ConsumerReceiveRequest.class, beanSer, - beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", - "ConsumerSetListRequest"), - ConsumerSetListRequest.class, beanSer, - beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", - "ConsumerUnsetListRequest"), - ConsumerUnsetListRequest.class, beanSer, - beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "ConsumerSubRequest"), - ConsumerSubRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "ConsumerUnsubRequest"), - ConsumerUnsubRequest.class, - beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", - "ConsumerCloseSubRequest"), - ConsumerCloseSubRequest.class, beanSer, - beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "QBrowseRequest"), - QBrowseRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "SessAckRequest"), - SessAckRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "SessDenyRequest"), - SessDenyRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "SessCreateDestRequest"), - SessCreateDestRequest.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "TempDestDeleteRequest"), - TempDestDeleteRequest.class, beanSer, - beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "GetAdminTopicRequest"), - GetAdminTopicRequest.class, beanSer, - beanSer); - - sendCall = new Call(); - sendCall.setSOAPMappingRegistry(mappingReg); - sendCall.setTargetObjectURI("urn:ProxyService"); - sendCall.setMethodName("send"); - sendCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); - - mappingReg = new SOAPMappingRegistry(); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "AbstractJmsReply"), - AbstractJmsReply.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "CnxConnectReply"), - CnxConnectReply.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "ServerReply"), - ServerReply.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "SessCreateTDReply"), - SessCreateDestReply.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "CnxCloseReply"), - CnxCloseReply.class, beanSer, beanSer); - mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC, - new QName("urn:ProxyService", "GetAdminTopicReply"), - GetAdminTopicReply.class, beanSer, beanSer); - - receiveCall = new Call(); - receiveCall.setSOAPMappingRegistry(mappingReg); - receiveCall.setTargetObjectURI("urn:ProxyService"); - receiveCall.setMethodName("getReply"); - receiveCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); - } - - /** - * Sending a JMS request through the SOAP protocol. - * - * @exception IllegalStateException If the SOAP service fails. - */ - public synchronized void send(AbstractJmsRequest request) throws Exception { - Hashtable h = request.soapCode(); - - // Setting the call's parameters: - Vector params = new Vector(); - params.addElement(new Parameter("name", String.class, identity.getUserName(), null)); - params.add(new Parameter("cnxId", Integer.class, - new Integer(cnxId), null)); - params.add(new Parameter("map", Hashtable.class, h, null)); - sendCall.setParams(params); - - // Sending the request, checking the reply: - try { - Response resp = sendCall.invoke(serviceUrl,""); - - // Check the response. - if (resp.generatedFault ()) { - throw new IllegalStateException("The SOAP service failed to process" - + " the call: " - + resp.getFault().getFaultString()); - } - } catch (SOAPException exc) { - throw new IllegalStateException("The SOAP call failed: " - + exc.getMessage()); - } - } - - /** Closes the SoapConnection. */ - public void close() {} - - /** - * Actually tries to set a first SOAP connection with the server. - * - * @param params Factory parameters. - * @param identity identity. - * - * @exception JMSSecurityException If the user identification is incorrect. - * @exception IllegalStateException If the SOAP service fails. - */ - private void connect(FactoryParameters factParams, Identity identity) throws JMSException { - // Setting the timer values: - long startTime = System.currentTimeMillis(); - long endTime = startTime + factParams.connectingTimer * 1000; - if (closing) { - endTime = startTime; - } - long currentTime; - long nextSleep = 2000; - boolean tryAgain; - int attemptsC = 0; - Response resp; - String error; - - try { - serviceUrl = new URL("http://" - + factParams.getHost() - + ":" - + factParams.getPort() - + "/soap/servlet/rpcrouter"); - } - catch (MalformedURLException exc) {} - - // Building the Call object for checking the user's identification: - Call checkCall = new Call(); - checkCall.setTargetObjectURI("urn:ProxyService"); - checkCall.setMethodName("setConnection"); - checkCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); - - Vector params = new Vector(); - Hashtable h; - try { - h = identity.soapCode(); - } catch (IOException e) { - throw new JMSException("EXCEPTION:: connect identity.soapCode(): " + e.getMessage()); - } - params.add(new Parameter("identityMap", Hashtable.class, h, null)); - params.addElement(new Parameter("timeout", - Integer.class, - new Integer(factParams.cnxPendingTimer), - null)); - - checkCall.setParams(params); - - while (true) { - tryAgain = false; - attemptsC++; - error = null; - - try { - resp = checkCall.invoke(serviceUrl,""); - - // SOAP sends a fault back: the service is possibly not started or - // not running. - if (resp.generatedFault ()) { - error = resp.getFault().getFaultString(); - tryAgain = true; - } - // RPC call worked: - else { - Integer result = (Integer) resp.getReturnValue().getValue(); - - // The returned value is either the key of the connection, or -1 - // if the user is invalid: - if (result.intValue() == -1) { - throw new JMSSecurityException("Can't open the connection with" - + " the server on host " - + factParams.getHost() - + " and port " - + factParams.getPort() - + ": invalid user identification."); - } - cnxId = result.intValue(); - break; - } - } - // SOAP call failed: the server may not be started. - catch (SOAPException exc) { - tryAgain = true; - error = exc.getMessage(); - } - // Trying again to connect: - if (tryAgain) { - currentTime = System.currentTimeMillis(); - // Keep on trying as long as timer is ok: - if (currentTime < endTime) { - - if (currentTime + nextSleep > endTime) - nextSleep = endTime - currentTime; - - // Sleeping for a while: - try { - Thread.sleep(nextSleep); - } - catch (InterruptedException intExc) {} - - // Trying again! - nextSleep = nextSleep * 2; - continue; - } - - long attemptsT = (System.currentTimeMillis() - startTime) / 1000; - throw new IllegalStateException("Could not open the connection with server " + factParams.getHost() + '/' + factParams.getPort() + - " after " + attemptsC + " attempts during " + attemptsT + "s: " + error); - } - } - } - - public AbstractJmsReply receive() throws Exception { - Vector params = new Vector(); - params.addElement(new Parameter("name", String.class, identity.getUserName(), null)); - params.addElement(new Parameter("cnxId", int.class, new Integer(cnxId), null)); - receiveCall.setParams(params); - - Response resp = null; - AbstractJmsReply reply = null; - - try { - resp = receiveCall.invoke(serviceUrl, ""); - } catch (SOAPException exc) { - throw new IOException("The SOAP call failed: " + exc.getMessage()); - } - - if (resp.generatedFault()) { - throw new IOException("The SOAP service failed to process the call: " - + resp.getFault().getFaultString()); - } - - try { - Hashtable h = (Hashtable) resp.getReturnValue().getValue(); - reply = (AbstractJmsReply) AbstractJmsMessage.soapDecode(h); - } catch (Exception exc) { - throw new IOException(exc.getMessage()); - } - - return reply; - } - - public void closing() { - closing = true; - } - - public Identity getIdentity() { - return identity; - } -} diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapServiceStarter.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapServiceStarter.java deleted file mode 100644 index 72dec9f8b2a2fdf13de12999e01bb73f3d358e44..0000000000000000000000000000000000000000 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/SoapServiceStarter.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2001 - ScalAgent Distributed Technologies - * Copyright (C) 1996 - Dyade - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA. - * - * Initial developer(s): Frederic Maistre (INRIA) - * Contributor(s): Nicolas Tachker (ScalAgent DT) - */ -package org.objectweb.joram.client.jms.soap; - -import org.apache.soap.rpc.Parameter; -import org.apache.soap.server.DeploymentDescriptor; -import org.apache.soap.server.ServiceManagerClient; -import org.apache.soap.server.TypeMapping; -import org.apache.soap.util.xml.QName; - -/** - * Utility class allowing to start JORAM SOAP service and the embedded - * server. - */ -public class SoapServiceStarter { - /** - * Deploys and starts JORAM SOAP service and the embedded JORAM server. - * - * @param args Name of host hosting Tomcat, tomcat's HTTP port (generally - * 8080), identifier of the embedded server, name of the embedded - * server. - * - * @exception exception If the deployment fails because Tomcat is not - * started. - */ - public static void main(String[] args) throws Exception { - String host = args[0]; - int port = Integer.parseInt(args[1]); - int serverId = Integer.parseInt(args[2]); - String serverName = args[3]; - - java.net.URL url = new java.net.URL("http://" + host + ":" + port - + "/soap/servlet/rpcrouter"); - - System.out.println("Starting the SOAP service on host " - + host - + " listening on port " - + port); - - ServiceManagerClient smc = new ServiceManagerClient(url); - smc.deploy(getDeploymentDescriptor()); - - System.out.println("SOAP service deployed."); - - org.apache.soap.rpc.Call call = new org.apache.soap.rpc.Call(); - call.setTargetObjectURI("urn:ProxyService"); - call.setMethodName("start"); - - java.util.Vector params = new java.util.Vector(); - params.add(new Parameter("serverId", Integer.class, - new Integer(serverId), null)); - params.add(new Parameter("serverName", String.class, serverName, null)); - call.setParams(params); - - System.out.println("Starting the " + serverName + " embedded server."); - - call.invoke(url,""); - - System.out.println("Server " + serverId + " started."); - } - - /** - * Builds and returns the DeploymentDescriptor of - * JORAM SOAP service. - */ - private static DeploymentDescriptor getDeploymentDescriptor() { - DeploymentDescriptor dd = new DeploymentDescriptor(); - - dd.setID("urn:ProxyService"); - - dd.setProviderType(DeploymentDescriptor.PROVIDER_JAVA); - dd.setProviderClass("org.objectweb.joram.mom.proxies.soap.SoapProxyService"); - dd.setScope(DeploymentDescriptor.SCOPE_APPLICATION); - - String[] methods = {"start", "setConnection", "send", "getReply"}; - dd.setMethods(methods); - - String[] listener = {"org.apache.soap.server.DOMFaultListener"}; - dd.setFaultListener(listener); - - dd.setMappings(getTypeMappings()); - - return dd; - } - - /** Builds and return the type mappings for JORAM SOAP service. */ - private static TypeMapping[] getTypeMappings() { - TypeMapping[] mappings = new TypeMapping[27]; - - String encoding = "http://schemas.xmlsoap.org/soap/encoding/"; - String bSerializer = "org.apache.soap.encoding.soapenc.BeanSerializer"; - - int i = 0; - - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "AbstractJmsRequest"), - "org.objectweb.joram.shared.client.AbstractJmsRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "CnxConnectRequest"), - "org.objectweb.joram.shared.client.CnxConnectRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "CnxStartRequest"), - "org.objectweb.joram.shared.client.CnxStartRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "CnxStopRequest"), - "org.objectweb.joram.shared.client.CnxStopRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "CnxCloseRequest"), - "org.objectweb.joram.shared.client.CnxCloseRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ConsumerAckRequest"), - "org.objectweb.joram.shared.client.ConsumerAckRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ConsumerDenyRequest"), - "org.objectweb.joram.shared.client.ConsumerDenyRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ConsumerReceiveRequest"), - "org.objectweb.joram.shared.client.ConsumerReceiveRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ConsumerSetListRequest"), - "org.objectweb.joram.shared.client.ConsumerSetListRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", - "ConsumerUnsetListRequest"), - "org.objectweb.joram.shared.client.ConsumerUnsetListRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ConsumerSubRequest"), - "org.objectweb.joram.shared.client.ConsumerSubRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ConsumerCloseSubRequest"), - "org.objectweb.joram.shared.client.ConsumerCloseSubRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ConsumerUnsubRequest"), - "org.objectweb.joram.shared.client.ConsumerUnsubRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "QBrowseRequest"), - "org.objectweb.joram.shared.client.QBrowseRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "SessAckRequest"), - "org.objectweb.joram.shared.client.SessAckRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "SessDenyRequest"), - "org.objectweb.joram.shared.client.SessDenyRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "SessCreateTQRequest"), - "org.objectweb.joram.shared.client.SessCreateTQRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "SessCreateTTRequest"), - "org.objectweb.joram.shared.client.SessCreateTTRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "TempDestDeleteRequest"), - "org.objectweb.joram.shared.client.TempDestDeleteRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "GetAdminTopicRequest"), - "org.objectweb.joram.shared.client.GetAdminTopicRequest", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "AbstractJmsReply"), - "org.objectweb.joram.shared.client.AbstractJmsReply", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "ServerReply"), - "org.objectweb.joram.shared.client.ServerReply", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "MomExceptionReply"), - "org.objectweb.joram.shared.client.MomExceptionReply", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "CnxConnectReply"), - "org.objectweb.joram.shared.client.CnxConnectReply", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "CnxCloseReply"), - "org.objectweb.joram.shared.client.CnxCloseReply", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "SessCreateTDReply"), - "org.objectweb.joram.shared.client.SessCreateTDReply", - bSerializer, bSerializer); - mappings[i++] = - new TypeMapping(encoding, - new QName("urn:ProxyService", "GetAdminTopicReply"), - "org.objectweb.joram.shared.client.GetAdminTopicReply", - bSerializer, bSerializer); - - return mappings; - } -} diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/TopicSoapConnectionFactory.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/TopicSoapConnectionFactory.java deleted file mode 100644 index 31392ee7f8f767cc66b80d98fc85ab4a436345af..0000000000000000000000000000000000000000 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/TopicSoapConnectionFactory.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * JORAM: Java(TM) Open Reliable Asynchronous Messaging - * Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies - * Copyright (C) 2004 Bull SA - * Copyright (C) 1996 - 2000 Dyade - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA. - * - * Initial developer(s): Frederic Maistre (INRIA) - * Contributor(s): ScalAgent Distributed Technologies - */ -package org.objectweb.joram.client.jms.soap; - -import javax.jms.JMSException; - -import org.objectweb.joram.client.jms.ConnectionFactory; -import org.objectweb.joram.client.jms.FactoryParameters; -import org.objectweb.joram.client.jms.TopicConnectionFactory; -import org.objectweb.joram.client.jms.connection.RequestChannel; -import org.objectweb.joram.shared.security.Identity; - -/** - * A TopicSoapConnectionFactory instance is a factory of - * SOAP connections for Pub/Sub communication. - * - * @deprecated Replaced next to Joram 5.2.1 by {@link SoapConnectionFactory}. - */ -public class TopicSoapConnectionFactory extends TopicConnectionFactory { - /** define serialVersionUID for interoperability */ - private static final long serialVersionUID = 1L; - - /** - * Constructs an empty TopicSoapConnectionFactory instance. - * Needed by ObjectFactory, should only be used for internal purposes. - */ - public TopicSoapConnectionFactory() {} - - /** - * Constructs a TopicSoapConnectionFactory instance. - * - * @param host Name or IP address of the server's host. - * @param port Server's listening port. - * @param timeout Duration in seconds during which a SOAP connection might - * be inactive before being considered as dead (0 for never). - */ - private TopicSoapConnectionFactory(String host, int port, int timeout) { - super(host, port); - params.cnxPendingTimer = timeout * 1000; - } - - /** - * Creates the SoapRequestChannel object specific to the protocol used. - * - * @param params Connection configuration parameters. - * @param identity Client's identity. - * @param reliableClass The protocol specific class. - * @return The RequestChannel object specific to the protocol used. - * - * @exception JMSException A problem occurs during the connection. - * - * @see ConnectionFactory#createRequestChannel(FactoryParameters, Identity, String) - */ - protected RequestChannel createRequestChannel(FactoryParameters params, - Identity identity, - String reliableClass) throws JMSException { - return new SoapRequestChannel(params, identity); - } - - /** - * Admin method creating a javax.jms.TopicConnectionFactory - * instance for creating SOAP connections with a given server. - * - * @param host Name or IP address of the server's host. - * @param port Server's listening port. - * @param timeout Duration in seconds during which a SOAP connection might - * be inactive before being considered as dead (0 for never). - */ - public static javax.jms.TopicConnectionFactory create(String host, int port, int timeout) { - return new TopicSoapConnectionFactory(host, port, timeout); - } -} diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/package.html b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/package.html deleted file mode 100644 index 86d74bb228e5794311b31e428f130c6dce5beaba..0000000000000000000000000000000000000000 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/jms/soap/package.html +++ /dev/null @@ -1,7 +0,0 @@ - - - -The org.objectweb.joram.client.jms.soap package holds the ConnectionFactory and Connection classes specialized for supporting the SOAP protocol as client - server communication protocol. - - - diff --git a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/osgi/ConnectionFactoryMSF.java b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/osgi/ConnectionFactoryMSF.java index c2dc2dd4c665932af0230572a75a6fb2596f57b4..a1f7df202830bbf955b02a08d8a94d9632cf138c 100644 --- a/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/osgi/ConnectionFactoryMSF.java +++ b/joram/joram/client/jms/src/main/java/org/objectweb/joram/client/osgi/ConnectionFactoryMSF.java @@ -33,7 +33,6 @@ import org.objectweb.joram.client.jms.admin.AbstractConnectionFactory; import org.objectweb.joram.client.jms.ha.local.HALocalConnectionFactory; import org.objectweb.joram.client.jms.ha.tcp.HATcpConnectionFactory; import org.objectweb.joram.client.jms.local.LocalConnectionFactory; -import org.objectweb.joram.client.jms.soap.SoapConnectionFactory; import org.objectweb.joram.client.jms.tcp.TcpConnectionFactory; import org.objectweb.joram.shared.security.SimpleIdentity; import org.objectweb.util.monolog.api.BasicLevel; @@ -187,23 +186,6 @@ public class ConnectionFactoryMSF implements ManagedServiceFactory { // HALocalConnectionFactory cf = HALocalConnectionFactory.create(); - } else if (SoapConnectionFactory.class.getName().equals(className)) { - // SoapConnectionFactory - String host = (String) properties.get(HOST); - if (!isSet(host)) - host = AbstractConnectionFactory.getDefaultServerHost(); - int port =-1; - String portStr = (String) properties.get(PORT); - if (!isSet(portStr)) - port = AbstractConnectionFactory.getDefaultServerPort(); - else - port = new Integer(portStr).intValue(); - int timeout = 60; - String timeoutStr = (String) properties.get(TIMEOUT); - if (isSet(timeoutStr)) - timeout = new Integer(timeoutStr).intValue(); - cf = SoapConnectionFactory.create(host, port, timeout); - } else { throw new ConfigurationException(CLASSNAME, "Unknown class : " + className); } diff --git a/joram/joram/client/jms/src/main/resources/org/objectweb/joram/client/jms/admin/joramAdmin.dtd b/joram/joram/client/jms/src/main/resources/org/objectweb/joram/client/jms/admin/joramAdmin.dtd index 825124fed916e12e621cbdda5e7cf77d7a5dc25a..50ff985ba467cf449844f031d4ab8459c8c2d8d5 100644 --- a/joram/joram/client/jms/src/main/resources/org/objectweb/joram/client/jms/admin/joramAdmin.dtd +++ b/joram/joram/client/jms/src/main/resources/org/objectweb/joram/client/jms/admin/joramAdmin.dtd @@ -1,6 +1,6 @@