You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/03/24 14:49:52 UTC
[1/4] cxf git commit: [CXF-6907] Cache the EPR for performance
Repository: cxf
Updated Branches:
refs/heads/3.1.x-fixes e1c2ff8bf -> ca87eda64
[CXF-6907] Cache the EPR for performance
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/89e2e1ba
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/89e2e1ba
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/89e2e1ba
Branch: refs/heads/3.1.x-fixes
Commit: 89e2e1bab7fecc155bed1d7f8c7f4258ee6550cf
Parents: e1c2ff8
Author: Daniel Kulp <dk...@apache.org>
Authored: Thu Mar 23 14:10:54 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Mar 24 10:48:36 2017 -0400
----------------------------------------------------------------------
.../java/org/apache/cxf/wsn/AbstractEndpoint.java | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/89e2e1ba/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
index 1cc869c..d886874 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
@@ -35,6 +35,8 @@ public abstract class AbstractEndpoint implements EndpointMBean {
protected EndpointManager manager;
protected Endpoint endpoint;
+
+ protected W3CEndpointReference endpointEpr;
public AbstractEndpoint(String name) {
this.name = name;
@@ -59,19 +61,24 @@ public abstract class AbstractEndpoint implements EndpointMBean {
public final URL getWSDLLocation() {
return CreatePullPoint.class.getClassLoader().getResource("org/apache/cxf/wsn/wsdl/wsn.wsdl");
}
- public void register() throws EndpointRegistrationException {
+ public synchronized void register() throws EndpointRegistrationException {
endpoint = manager.register(getAddress(), this, getWSDLLocation());
+ endpointEpr = null;
}
- public void unregister() throws EndpointRegistrationException {
+ public synchronized void unregister() throws EndpointRegistrationException {
if (endpoint != null) {
manager.unregister(endpoint, this);
+ endpointEpr = null;
}
}
- public W3CEndpointReference getEpr() {
+ public synchronized W3CEndpointReference getEpr() {
if (endpoint != null) {
- return manager.getEpr(endpoint);
+ if (endpointEpr == null) {
+ endpointEpr = manager.getEpr(endpoint);
+ }
+ return endpointEpr;
}
return null;
}
[3/4] cxf git commit: [CXF-6598] Fix problem of inout headers when
unwrapped causing IndexOutOfBoundsException
Posted by dk...@apache.org.
[CXF-6598] Fix problem of inout headers when unwrapped causing IndexOutOfBoundsException
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/469f604d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/469f604d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/469f604d
Branch: refs/heads/3.1.x-fixes
Commit: 469f604d2121f3f6696db599e0bc1dbc295a9200
Parents: 41db615
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Mar 24 10:02:24 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Mar 24 10:49:39 2017 -0400
----------------------------------------------------------------------
.../factory/ReflectionServiceFactoryBean.java | 54 ++++++++++++++++----
1 file changed, 43 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/469f604d/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
index c55b832..2ba3338 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
@@ -126,6 +126,7 @@ import org.apache.ws.commons.schema.utils.NamespaceMap;
* will be filled in from the service class. If no WSDL URL is specified, the
* Service will be constructed directly from the class structure.
*/
+//CHECKSTYLE:OFF:NCSS - This class is just huge and complex
public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory.AbstractServiceFactoryBean {
public static final String ENDPOINT_CLASS = "endpoint.class";
@@ -752,6 +753,15 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
}
o.setProperty(METHOD_PARAM_ANNOTATIONS, method.getParameterAnnotations());
o.setProperty(METHOD_ANNOTATIONS, method.getAnnotations());
+ //Set all out of band indexes to MAX_VALUE, anything left at MAX_VALUE after this is unmapped
+ for (MessagePartInfo mpi : o.getInput().getOutOfBandParts()) {
+ mpi.setIndex(Integer.MAX_VALUE);
+ }
+ if (o.hasOutput()) {
+ for (MessagePartInfo mpi : o.getOutput().getOutOfBandParts()) {
+ mpi.setIndex(Integer.MAX_VALUE);
+ }
+ }
Class<?>[] paramTypes = method.getParameterTypes();
Type[] genericTypes = method.getGenericParameterTypes();
for (int i = 0; i < paramTypes.length; i++) {
@@ -764,12 +774,16 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
return false;
}
}
+ setIndexes(o.getInput());
sendEvent(Event.OPERATIONINFO_IN_MESSAGE_SET, origOp, method, origOp.getInput());
// Initialize return type
if (o.hasOutput()
&& !initializeParameter(o, method, -1, method.getReturnType(), method.getGenericReturnType())) {
return false;
}
+ if (o.hasOutput()) {
+ setIndexes(o.getOutput());
+ }
if (origOp.hasOutput()) {
sendEvent(Event.OPERATIONINFO_OUT_MESSAGE_SET, origOp, method, origOp.getOutput());
}
@@ -777,6 +791,20 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
setFaultClassInfo(o, method);
return true;
}
+ private void setIndexes(MessageInfo m) {
+ int max = -1;
+ for (MessagePartInfo mpi : m.getMessageParts()) {
+ if (mpi.getIndex() > max && mpi.getIndex() != Integer.MAX_VALUE) {
+ max = mpi.getIndex();
+ }
+ }
+ for (MessagePartInfo mpi : m.getMessageParts()) {
+ if (mpi.getIndex() == Integer.MAX_VALUE) {
+ max++;
+ mpi.setIndex(max);
+ }
+ }
+ }
private boolean initializeParameter(OperationInfo o, Method method, int i,
Class<?> paramType, Type genericType) {
boolean isIn = isInParam(method, i);
@@ -799,26 +827,33 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
}
if (part == null && isHeader && o.isUnwrapped()) {
part = ((UnwrappedOperationInfo)o).getWrappedOperation().getInput().getMessagePart(name);
+ boolean add = true;
if (part == null) {
QName name2 = this.getInParameterName(o, method, i);
part = o.getInput().getMessagePart(name2);
if (part != null) {
+ add = false;
name = name2;
}
}
if (part != null) {
//header part in wsdl, need to get this mapped in to the unwrapped form
- MessagePartInfo inf = o.getInput().addMessagePart(part.getName());
- inf.setTypeQName(part.getTypeQName());
- inf.setElement(part.isElement());
- inf.setElementQName(part.getElementQName());
- inf.setConcreteName(part.getConcreteName());
- inf.setXmlSchema(part.getXmlSchema());
if (paraAnnos != null) {
part.setProperty(PARAM_ANNOTATION, paraAnnos);
}
- part = inf;
- inf.setProperty(HEADER, Boolean.TRUE);
+ if (add) {
+ MessagePartInfo inf = o.getInput().addMessagePart(part.getName());
+ inf.setTypeQName(part.getTypeQName());
+ inf.setElement(part.isElement());
+ inf.setElementQName(part.getElementQName());
+ inf.setConcreteName(part.getConcreteName());
+ inf.setXmlSchema(part.getXmlSchema());
+ part = inf;
+ if (paraAnnos != null) {
+ part.setProperty(PARAM_ANNOTATION, paraAnnos);
+ }
+ }
+ part.setProperty(HEADER, Boolean.TRUE);
}
}
if (part == null) {
@@ -1497,7 +1532,6 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
MessageInfo inMsg = op.createMessage(this.getInputMessageName(op, method), MessageInfo.Type.INPUT);
op.setInput(inMsg.getName().getLocalPart(), inMsg);
final Annotation[][] parAnnotations = method.getParameterAnnotations();
- // CHECKSTYLE:ON
final Type[] genParTypes = method.getGenericParameterTypes();
for (int j = 0; j < paramClasses.length; j++) {
if (Exchange.class.equals(paramClasses[j])) {
@@ -1518,9 +1552,7 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
LOG.log(Level.WARNING, "INVALID_WEBPARAM_MODE", getServiceClass().getName() + "."
+ method.getName());
}
- // CHECKSTYLE:ON
initializeParameter(part, paramClasses[j], genParTypes[j]);
- //TODO:remove method param annotations
part.setProperty(METHOD_PARAM_ANNOTATIONS, parAnnotations);
part.setProperty(PARAM_ANNOTATION, parAnnotations[j]);
if (getJaxbAnnoMap(part).size() > 0) {
[2/4] cxf git commit: [CXF-6672] Catch trhowable instead of exception
to grab errors as well
Posted by dk...@apache.org.
[CXF-6672] Catch trhowable instead of exception to grab errors as well
# Conflicts:
# rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/41db6153
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/41db6153
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/41db6153
Branch: refs/heads/3.1.x-fixes
Commit: 41db6153feec7f81190de235d4797cc18fb4bf6d
Parents: 89e2e1b
Author: Daniel Kulp <dk...@apache.org>
Authored: Thu Mar 23 14:12:29 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Mar 24 10:49:35 2017 -0400
----------------------------------------------------------------------
.../transport/jms/util/PollingMessageListenerContainer.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/41db6153/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
index f79ab09..8b904e2 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/PollingMessageListenerContainer.java
@@ -71,12 +71,12 @@ public class PollingMessageListenerContainer extends AbstractMessageListenerCont
if (session.getTransacted()) {
session.commit();
}
- } catch (Exception e) {
+ } catch (Throwable e) {
LOG.log(Level.WARNING, "Exception while processing jms message in cxf. Rolling back", e);
safeRollBack(session, e);
}
}
- } catch (Exception e) {
+ } catch (Throwable e) {
LOG.log(Level.WARNING, "Unexpected exception. Restarting session and consumer", e);
} finally {
ResourceCloser.close(consumer);
@@ -91,7 +91,7 @@ public class PollingMessageListenerContainer extends AbstractMessageListenerCont
if (session.getTransacted()) {
session.rollback();
}
- } catch (Exception e1) {
+ } catch (Throwable e1) {
LOG.log(Level.WARNING, "Rollback of Local transaction failed", e1);
}
}
[4/4] cxf git commit: Recording .gitmergeinfo Changes
Posted by dk...@apache.org.
Recording .gitmergeinfo Changes
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ca87eda6
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ca87eda6
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ca87eda6
Branch: refs/heads/3.1.x-fixes
Commit: ca87eda64904abcd7892785763cf7127e8d6a4a5
Parents: 469f604
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Mar 24 10:49:39 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Mar 24 10:49:39 2017 -0400
----------------------------------------------------------------------
.gitmergeinfo | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/ca87eda6/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 79b7432..c92b23f 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -143,6 +143,7 @@ B 69c7b4c1ce4a9d131802c9a198706581eb4a3e91
B 6c324421a358919b4ecb3cfdd8a2e0e16ff81724
B 6d82b75eb982f13f5f071178aeef66e55b0e3fd4
B 6df5deab24016d07e4099712b07535688d164d94
+B 6e01fcffa1e64f38b69a7cae9b2a7236d7ec330d
B 6e7b79f6a8b6523b2248937275d92918e5682aa2
B 6fcdc7e9eec2414a40bd3161cf237ef182e313a6
B 702389744199001e6c35e602ffb197ebaaf84838
@@ -228,6 +229,7 @@ B bd24e7efd7f8f4258e8fde99eb63e007378048f0
B bd8aff6652eef048513571b96c703f4333f24dfb
B bd95151baf5368295db6bf9798d106d89f2f8a60
B be6190da7b0a05c505c99668270c993cd94a0eb2
+B bee6f221450179d4e680bc8abc1e7dd39347bea7
B befeb0484cb195cbcd6163f65c54a94ba26d8335
B bfa7a22c95af1f7c33f218d0cf5b10f17fce308c
B bff51a63aa05df40f92c80bb940fb43af78653f2
@@ -401,6 +403,7 @@ M 7c3a8b02a62db3bcc5c3a1895e9f30bc4fa3821a
M 7dbb31aed4bfa28bd170d6170d76ba4d7f43e7de
M 7e952df66b6ede5c8084aa3387f82224ef04e1ea
M 7fa67da1925e0a526730e6f83415a0826c72b1d4
+M 8049b4c2df7690b493462997c37168622a11324c
M 804a957eb4225a1eaf65399881cdcd8552c00f52
M 80ca2370616c28b036c54c95af84ca62f1725a30
M 8118c5a301f22dea16c9d235ad378584a0ae2466