User: jung
Date: 01/01/04 06:45:06
Modified: src/org/jboss/ejb/plugins/zoap ComponentURNResolver.java
SoapComponent.java SoapContainerInvoker.java
SoapInvocationHandler.java
Log:
exception redesign. Improved null-pointer treatment. coherent environment and
logging facilities.
LGPL references.
Revision Changes Path
1.4 +16 -21 zoap/src/org/jboss/ejb/plugins/zoap/ComponentURNResolver.java
Index: ComponentURNResolver.java
===================================================================
RCS file:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/ComponentURNResolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ComponentURNResolver.java 2000/12/04 12:35:57 1.3
+++ ComponentURNResolver.java 2001/01/04 14:45:05 1.4
@@ -1,21 +1,22 @@
-/*
- * $Id: ComponentURNResolver.java,v 1.3 2000/12/04 12:35:57 jung Exp $
- * Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
- * D-66299 Friedrichsthal, Germany. All Rights Reserved.
+/*
+ * $Source:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/ComponentURNResolver.java,v $
+ * The Zero-effort Object Access Package is a library to support XML/SOAP
serialisation and invocation.
+ * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
+ * D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * 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 (at your option) any later version.
*
- * This program 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 General Public License for more details.
+ * 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 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
*/
@@ -40,8 +41,6 @@
throws IOException {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".resolveURN(" + theUrn +
"," + visitedURNs + ")");
return new XmlObjectReader(
new java.io.InputStreamReader(Thread.
@@ -52,17 +51,4 @@
}
}
-
-/*
- * $Log: ComponentURNResolver.java,v $
- * Revision 1.3 2000/12/04 12:35:57 jung
- * adopted to latest jboss container,
- *
- * added decimal and date
- *
- * removed some problems due to forward-referencing in meta-data
- *
- * added serialisation policy
- *
- */
1.3 +16 -21 zoap/src/org/jboss/ejb/plugins/zoap/SoapComponent.java
Index: SoapComponent.java
===================================================================
RCS file:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/SoapComponent.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SoapComponent.java 2000/12/04 12:35:58 1.2
+++ SoapComponent.java 2001/01/04 14:45:05 1.3
@@ -1,21 +1,22 @@
/*
- * $Id: SoapComponent.java,v 1.2 2000/12/04 12:35:58 jung Exp $
- * Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
- * D-66299 Friedrichsthal, Germany. All Rights Reserved.
+ * $Source:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/SoapComponent.java,v $
+ * The Zero-effort Object Access Package is a library to support XML/SOAP
serialisation and invocation.
+ * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
+ * D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * 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 (at your option) any later version.
*
- * This program 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 General Public License for more details.
+ * 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 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
*/
package org.jboss.ejb.plugins.zoap;
@@ -40,7 +41,7 @@
/**
* SoapComponent is an extension to the de.infor.ce.util.Component concept that
stores meta-data used for SOAP services.
* @author $Author: jung $
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class SoapComponent extends Component {
@@ -55,9 +56,6 @@
super(classLoader);
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.print(toString() + "(" + classLoader + "," +
bindingClassName + "," + readMetaData + "," + fileName + ")\n");
-
enter();
binding = (SoapBinding)Class.forName(bindingClassName, true,
@@ -83,9 +81,6 @@
/** returns the binding associated to this component */
public SoapBinding getBinding() {
-
- if(Environment.DEBUG_LEVEL>0)
- Environment.out.println(toString()+".getBinding()");
return binding;
}
1.3 +68 -142 zoap/src/org/jboss/ejb/plugins/zoap/SoapContainerInvoker.java
Index: SoapContainerInvoker.java
===================================================================
RCS file:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/SoapContainerInvoker.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SoapContainerInvoker.java 2000/12/04 12:35:58 1.2
+++ SoapContainerInvoker.java 2001/01/04 14:45:05 1.3
@@ -1,21 +1,22 @@
-/*
- * $Id: SoapContainerInvoker.java,v 1.2 2000/12/04 12:35:58 jung Exp $
- * Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
- * D-66299 Friedrichsthal, Germany. All Rights Reserved.
+/*
+ * $Source:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/SoapContainerInvoker.java,v $
+ * The Zero-effort Object Access Package is a library to support XML/SOAP
serialisation and invocation.
+ * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
+ * D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * 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 (at your option) any later version.
*
- * This program 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 General Public License for more details.
+ * 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 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
*/
package org.jboss.ejb.plugins.zoap;
@@ -73,7 +74,7 @@
* resolved sufficiently. For example the creation of invocation handlers
* to the home and to the bean is yet implemented only prototypically.
* @author $Author: jung $
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class SoapContainerInvoker implements ContainerInvoker, SoapRouter,
XmlLoadable {
@@ -103,8 +104,6 @@
/** accessor to container, initialises the component information for the whole
EJB application */
public void setContainer(Container theContainer) {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".setContainer(" +
theContainer + ")");
con = theContainer;
@@ -136,8 +135,8 @@
}
try {
- serialisationPolicy = (SerialisationPolicy)
Class.forName(MetaData.getElementContent(MetaData.
- getUniqueChild(element, "SerialisationPolicyClass")),true,
con.getClassLoader()).newInstance();
+ serialisationPolicy =
(SerialisationPolicy)Class.forName(MetaData.getElementContent(MetaData.
+ getUniqueChild(element, "SerialisationPolicyClass")), true,
con.getClassLoader()).newInstance();
} catch (Exception e) {
}
}
@@ -145,33 +144,20 @@
/** the constructor is empty */
public SoapContainerInvoker() {
-
-
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + "()");
-
-
}
/** the init method, prepare to operation by finding out the server */
public void init() throws Exception {
-
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".init()");
-
-
server =
- (SoapServer)MBeanProxy.create(SoapServer.class, Environment.moduleName
+ ":server=HTTP");
+ (SoapServer)MBeanProxy.
+ create(SoapServer.class, Environment.JMX_NAME);
}
/** start method to register at the server as a soap router */
public void start() throws Exception {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".start()");
-
server.registerSoapRouter(con.getBeanMetaData().getJndiName(), this);
}
@@ -190,46 +176,21 @@
public void receiveRequest(String handle, SoapMessage message,
SoapMessage response) throws SoapMessageException {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".receiveRequest(" +
handle + "," +
- message + "," + response + ")");
-
if (component == null) {
synchronized(this) {
if (component == null) {
try {
component = new
SoapComponent(con.getClassLoader(),
- bindingClassName,
readMetaData, metaDataFileName);
- } catch (Component.DoubleComponentException e)
{
-
- if (Environment.DEBUG_LEVEL > 0 ||
Environment.LOG_LEVEL > 0)
-
Environment.err.print(toString() + ".receiveRequest(" + handle + "," +
- message + "," + response + "):
encountered component error " + e + ".\n");
-
- } catch (java.io.IOException e) {
+ bindingClassName, readMetaData,
metaDataFileName);
+ } catch (Throwable t) {
- if (Environment.DEBUG_LEVEL > 0 ||
Environment.LOG_LEVEL > 0)
-
Environment.err.print(toString() + ".receiveRequest(" + handle + "," +
- message + "," + response + "):
encountered component error " + e + ".\n");
+ if (Environment.DEBUG_LEVEL > 0 ||
Environment.LOG_LEVEL > 0) {
+
Environment.CONSOLE.error(toString() +
+ ".receiveRequest(" + handle +
"," +
+ message + "," + response + "):
encountered " + t.toString() + " while initialising component.");
+
Environment.CONSOLE.exception(t);
+ }
- } catch (ClassNotFoundException e) {
-
- if (Environment.DEBUG_LEVEL > 0 ||
Environment.LOG_LEVEL > 0)
-
Environment.err.print(toString() + ".receiveRequest(" + handle + "," +
- message + "," + response + "):
encountered component error " + e + ".\n");
-
- } catch (InstantiationException e) {
-
- if (Environment.DEBUG_LEVEL > 0 ||
Environment.LOG_LEVEL > 0)
-
Environment.err.print(toString() + ".receiveRequest(" + handle + "," +
- message + "," + response + "):
encountered component error " + e + ".\n");
-
- } catch (IllegalAccessException e) {
-
- if (Environment.DEBUG_LEVEL > 0 ||
Environment.LOG_LEVEL > 0)
-
Environment.err.print(toString() + ".receiveRequest(" + handle + "," +
- message + "," + response + "):
encountered component error " + e + ".\n");
-
}
} // if
} // synchronized
@@ -244,8 +205,9 @@
// this should be the envelope that we receive
Envelope envelope = null;
- if (Environment.LOG_LEVEL > 1)
- Environment.out.println(((org.zoap.soap.HttpRequest)
message).getBody());
+ if (Environment.LOG_LEVEL > 1 && message instanceof
org.zoap.soap.HttpRequest)
+ Environment.CONSOLE.log(toString() + ".receiveRequest(" +
handle + "," + message + "," + response + "): got request body " +
+ ((org.zoap.soap.HttpRequest) message).getBody());
try {
@@ -256,21 +218,19 @@
// SoapException means a generic error while getting the
envelope
// this is preinvocation, so we return a message exception
-
- if (Environment.DEBUG_LEVEL > 0)
-
Environment.err.println("SoapContainerInvoker.receiveMessage(" + handle + "," +
- message + "," + response + "): encountered soap
exception " + e);
-
component.leave();
+
+ throw new SoapMessageException(toString() + ".receiveMessage("
+ handle + "," +
+ message + "," + response + "): encountered " + e.toString() +
" while trying to extract envelope.", e);
- throw new SoapMessageException();
}
// if it does not contain a method call, we are pissed
if (envelope == null || !(envelope.getBody() instanceof
MethodRequest)) {
component.leave();
- throw new SoapMessageException();
+ throw new SoapMessageException(toString() + ".receiveRequest("
+ handle + "," + message + "," +
+ response + "): null envelope or non-MethodRequest envelope
found.");
}
// isolate the embedded method call that is inside
@@ -286,7 +246,7 @@
methodResponse.setValue(con.invoke(
new MethodInvocation(handle,
- methodRequest.getMethod(), methodRequest.getArguments(),
null, null,null)));
+ methodRequest.getMethod(), methodRequest.getArguments(),
null, null, null)));
returnValue = new Envelope(null, methodResponse);
@@ -294,36 +254,34 @@
} catch (IllegalAccessException e) {
// illegal access is deep, no application error
- if (Environment.DEBUG_LEVEL > 0)
-
Environment.err.println("SoapContainerInvoker.receiveMessage(" + message + "," +
response +
- "): encountered security problem " + e);
component.leave();
- throw new SoapMessageException();
+ throw new SoapMessageException(toString() + ".receiveMessage("
+ handle + "," + message + "," + response + "): encountered " + e.toString() +
+ " while trying to invoke container.", e);
} catch (NoSuchMethodException e) {
// no such method exception is not quite that deep, but
// for the moment, we dont treat it as application-close error
- if (Environment.DEBUG_LEVEL > 0)
-
Environment.err.println("SoapContainerInvoker.receiveMessage(" + message + "," +
response +
- "): no such method " + e);
component.leave();
- throw new SoapMessageException();
+ throw new SoapMessageException(toString() + ".receiveMessage("
+ handle + "," + message + "," + response + "): encountered " + e.toString() +
+ " while trying to invoke container.", e);
} catch (Throwable t) {
// ahh, this is the indicator for some application error that
we
// put into the message back to the sender
- if (Environment.DEBUG_LEVEL > 0)
-
Environment.err.println("SoapContainerInvoker.receiveMessage(" + message + "," +
response +
- "): application exception encountered " + t);
+ if (Environment.LOG_LEVEL > 0) {
+ Environment.CONSOLE.log(toString() +
".receiveRequest(" + handle + "," + message + "," + response +
+ "): encountered application exception " + t.toString()
+ " while invoking container.");
+ if (Environment.LOG_LEVEL > 1) {
+ Environment.CONSOLE.exception(t);
+ }
+ }
- t.printStackTrace();
-
returnValue = new Envelope(null, t);
} // try
@@ -336,24 +294,23 @@
try {
response.setEnvelope(returnValue,
((SoapComponent)component).getBinding(),
- serialisationPolicy);
+ serialisationPolicy);
} catch (SoapException e) {
// where still, some exception could occur
- if (Environment.DEBUG_LEVEL > 0)
- Environment.err.println("Interceptor.receiveMessage("
+ message + "," + response +
- "): soap exception while setting return envelope " +
e);
+ throw new SoapMessageException(toString() + ".receiveRequest("
+ handle + "," + message + "," + response + "): encountered " + e.toString() +
+ " while trying to serialise response envelope.", e);
- throw new SoapMessageException();
} finally {
component.leave();
} // try
- if (Environment.LOG_LEVEL > 1)
- Environment.out.println(((org.zoap.soap.HttpResponse)
response).
- getBody());
+ if (Environment.LOG_LEVEL > 1 && response instanceof
org.zoap.soap.HttpResponse) {
+ Environment.CONSOLE.log(toString() + ".receiveRequest(" +
handle + "," + message + "," + response + "): send response body " +
+ ((org.zoap.soap.HttpResponse) response).getBody());
+ }
} // receiveRequest
@@ -362,21 +319,19 @@
public void stop() {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".stop()");
-
try {
server.unRegisterSoapRouter(con.getBeanMetaData().getJndiName());
- } catch (SoapException e) { }
+ } catch (SoapException e) {
+ if (Environment.LOG_LEVEL > 0) {
+ Environment.CONSOLE.error(toString() + ".stop():
encountered " + e.toString() + " while unregistering invoker at server.");
+ Environment.CONSOLE.exception(e);
+ }
+ }
}
/** destroy it */
public void destroy() {
-
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".destroy()");
-
server = null;
}
@@ -387,10 +342,6 @@
*/
public EJBMetaData getEJBMetaData() {
-
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".getEJBMetaData()");
-
return null;
}
@@ -402,10 +353,6 @@
*/
public EJBHome getEJBHome() {
-
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".getEJBHome()");
-
// fiddle with the class loader to run into protected component code
ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(con.getClassLoader());
@@ -425,9 +372,6 @@
public EJBObject getStatelessSessionEJBObject() {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() +
".getStatelessSessionEJBObject()");
-
// fiddle with the class loader to run into protected component code
ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(con.getClassLoader());
@@ -446,9 +390,6 @@
public EJBObject getStatefulSessionEJBObject(Object id) {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() +
".getStatefulSessionEJBObject()");
-
// fiddle with the class loader to run into protected component code
ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(con.getClassLoader());
@@ -466,17 +407,11 @@
public EJBObject getEntityEJBObject(Object id) {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".getEntityEJBObject(" +
id + ")");
-
return null;
}
public Collection getEntityCollection(Collection ids) {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".getEntityCollection(" +
ids + ")");
-
return null;
}
@@ -484,18 +419,12 @@
public void unRegisterSoapObject(String handle) {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".unregisterSoapObject("
+ handle + ")");
-
}
/** registration is not necessary */
public String registerSoapObject(SoapObject object) {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".registerSoapObject(" +
object + ")");
-
return null;
}
@@ -503,19 +432,16 @@
public java.net.URL getURL() {
- if (Environment.DEBUG_LEVEL > 0)
- Environment.out.println(toString() + ".getURL()");
-
try {
return new java.net.URL(server.getURL(),
con.getBeanMetaData().getJndiName());
- } catch (java.net.MalformedURLException e) {
- return null;
- } catch (java.net.UnknownHostException e) {
+ } catch (Exception e) {
+ if (Environment.LOG_LEVEL > 0) {
+ Environment.CONSOLE.error(toString() + ".getURL():
encountered " + e.toString() +
+ " while trying to construct target url of SOAP
container router.");
+ Environment.CONSOLE.exception(e);
+ }
return null;
}
}
-
-
-
}
1.3 +18 -41 zoap/src/org/jboss/ejb/plugins/zoap/SoapInvocationHandler.java
Index: SoapInvocationHandler.java
===================================================================
RCS file:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/SoapInvocationHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SoapInvocationHandler.java 2000/12/04 12:35:58 1.2
+++ SoapInvocationHandler.java 2001/01/04 14:45:05 1.3
@@ -1,21 +1,22 @@
-/*
- * $Id: SoapInvocationHandler.java,v 1.2 2000/12/04 12:35:58 jung Exp $
- * Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
- * D-66299 Friedrichsthal, Germany. All Rights Reserved.
+/*
+ * $Source:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/SoapInvocationHandler.java,v
$
+ * The Zero-effort Object Access Package is a library to support XML/SOAP
serialisation and invocation.
+ * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
+ * D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * 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 (at your option) any later version.
*
- * This program 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 General Public License for more details.
+ * 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 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
*/
package org.jboss.ejb.plugins.zoap;
@@ -52,7 +53,7 @@
* A lightweight in-VM invocation-handler that provides an immediate access to
the interceptor-chain of jBoss.
* @see <related>
* @author $Author: jung $
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class SoapInvocationHandler implements InvocationHandler, SoapObject,
Serializable {
@@ -105,9 +106,6 @@
public Object invoke(Object target, Method method, Object[] args) throws
Throwable {
- if (Environment.DEBUG_LEVEL>0)
- Environment.out.print(toString() + ".invoke(" + method + "," +
args + ")\n");
-
if (homeInterface.equals(method.getDeclaringClass()) &&
method.getName().equals("create")) {
return
java.lang.reflect.Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
@@ -158,16 +156,11 @@
return
((MethodResponse)responseEnvelope.getBody()).getValue();
else
- throw new SoapException();
+ throw new
SoapException(toString()+".invoke(*SUPPRESSED_POTENTIALLY_RECURSIVE_PROXY_REPRESENTATION*,"+method+","+args+"):
response "+response.toString()+" is neither MethodResponse nor Throwable.");
} catch (SoapTargetNotSupportedException e) {
// this happens, if the given url is not supported, so
we throw a
- // severe runtime exception
-
- if (Environment.DEBUG_LEVEL>0)
-
Environment.err.println("SoapInvocationHandler.invoke(" + method + "," + args +
- "): encountered url exception " + e);
throw e;
@@ -176,10 +169,6 @@
// this happens if something with the serialisation
has been broken
// so we throw a severe runtime exception
- if (Environment.DEBUG_LEVEL>0)
-
Environment.err.println("SoapInvocationHandler.invoke(" + method + "," + args +
- "): encountered soap exception " + e);
-
throw e;
}
@@ -192,9 +181,6 @@
public void receiveRequest(SoapMessage message, SoapMessage response)
throws SoapMessageException {
- if (Environment.DEBUG_LEVEL>0)
-
Environment.out.println("SoapInvocationHandler.receiveRequest(" + message + "," +
response + ")");
-
}
public SoapRouter getRouter() {
@@ -202,21 +188,3 @@
}
} // SoapInvocationHandler
-
-/*
- * $Log: SoapInvocationHandler.java,v $
- * Revision 1.2 2000/12/04 12:35:58 jung
- * adopted to latest jboss container,
- *
- * added decimal and date
- *
- * removed some problems due to forward-referencing in meta-data
- *
- * added serialisation policy
- *
- * Revision 1.1.1.1 2000/08/10 21:06:52 jung
- * Initial import.
- *
- *
- */
-