Author: alessio.soldano(a)jboss.com
Date: 2012-12-11 09:30:36 -0500 (Tue, 11 Dec 2012)
New Revision: 17067
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java
Log:
Few fixes / improvements
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java 2012-12-11
13:28:40 UTC (rev 17066)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java 2012-12-11
14:30:36 UTC (rev 17067)
@@ -158,7 +158,6 @@
throw MESSAGES.differentElementExpected(handlerFile, "{" +
ParserConstants.JAVAEE_NS + "}"
+ ParserConstants.HANDLER_CHAINS, "{" + el.getNamespaceURI()
+ "}" + el.getLocalName());
}
- chain = new ArrayList<Handler>();
Node node = el.getFirstChild();
while (node != null) {
if (node instanceof Element) {
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2012-12-11
13:28:40 UTC (rev 17066)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2012-12-11
14:30:36 UTC (rev 17067)
@@ -24,6 +24,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import org.apache.cxf.Bus;
import org.apache.cxf.buslifecycle.BusLifeCycleListener;
@@ -168,7 +169,8 @@
{
if (props != null && !props.isEmpty()) {
Map<String, Map<String, String>> queuesMap = new HashMap<String,
Map<String,String>>();
- for (final String k : props.keySet()) {
+ for (Entry<String, String> e : props.entrySet()) {
+ String k = e.getKey();
if (k.startsWith(Constants.CXF_QUEUE_PREFIX)) {
String sk = k.substring(Constants.CXF_QUEUE_PREFIX.length());
int i = sk.indexOf(".");
@@ -180,13 +182,14 @@
m = new HashMap<String, String>();
queuesMap.put(queueName, m);
}
- m.put(queueProp, props.get(k));
+ m.put(queueProp, e.getValue());
}
}
}
WorkQueueManager mgr = bus.getExtension(WorkQueueManager.class);
- for (String queueName : queuesMap.keySet()) {
- AutomaticWorkQueue q = createWorkQueue(queueName, queuesMap.get(queueName));
+ for (Entry<String, Map<String, String>> e : queuesMap.entrySet()) {
+ final String queueName = e.getKey();
+ AutomaticWorkQueue q = createWorkQueue(queueName, e.getValue());
mgr.addNamedWorkQueue(queueName, q);
}
}
@@ -269,7 +272,7 @@
this.bus = bus;
}
- private class BusHolderLifeCycleListener implements BusLifeCycleListener
+ private static class BusHolderLifeCycleListener implements BusLifeCycleListener
{
private volatile boolean preShutdown = false;
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java 2012-12-11
13:28:40 UTC (rev 17066)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java 2012-12-11
14:30:36 UTC (rev 17067)
@@ -86,8 +86,14 @@
File tmpDir = IOUtils.createTempDirectory();
tmpFile = File.createTempFile("jbossws-cxf", ".xml",
tmpDir);
Writer writer = new OutputStreamWriter(new FileOutputStream(tmpFile));
- writeTo(writer);
- writer.close();
+ try
+ {
+ writeTo(writer);
+ }
+ finally
+ {
+ writer.close();
+ }
return tmpFile.toURI().toURL();
}