Author: gnodet
Date: Thu Jul 31 03:26:51 2008
New Revision: 681324
URL: http://svn.apache.org/viewvc?rev=681324&view=rev
Log:
SM-1442: Allow ServiceMix to build using the ibm jdk
Modified:
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsConnector.java
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsSoapConnector.java
servicemix/smx3/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/reflection/ReflectionBindingTest.java
servicemix/smx3/trunk/core/servicemix-core/pom.xml
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/PropertiesLoginModuleTest.java
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SecuredBrokerTest.java
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SpringSecuredBrokerTest.java
servicemix/smx3/trunk/core/servicemix-jbi/pom.xml
servicemix/smx3/trunk/core/servicemix-services/pom.xml
servicemix/smx3/trunk/core/servicemix-utils/pom.xml
servicemix/smx3/trunk/pom.xml
servicemix/smx3/trunk/samples/loan-broker/loan-broker-drools-su/pom.xml
Modified:
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsConnector.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsConnector.java?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
---
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsConnector.java
(original)
+++
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsConnector.java
Thu Jul 31 03:26:51 2008
@@ -18,6 +18,7 @@
import java.io.IOException;
import java.net.URL;
+import java.security.Security;
import javax.jbi.JBIException;
import javax.jbi.component.ComponentContext;
@@ -55,8 +56,14 @@
private String keyStorePassword;
private String keyStoreType = "JKS"; // type of the key store
private String protocol = "TLS";
- private String keyManagerFactoryAlgorithm = "SunX509"; // cert algorithm
- private String trustManagerFactoryAlgorithm = "SunX509"; // cert algorithm
+ // cert algorithm
+ private String keyManagerFactoryAlgorithm = Security.getProperty(
+ "ssl.KeyManagerFactory.algorithm") == null
+ ? "SunX509" : Security.getProperty("ssl.KeyManagerFactory.algorithm");
+ // cert algorithm
+ private String trustManagerFactoryAlgorithm = Security.getProperty(
+ "ssl.TrustManagerFactory.algorithm") == null
+ ? "SunX509" :
Security.getProperty("ssl.TrustManagerFactory.algorithm");
private boolean wantClientAuth = false;
private boolean needClientAuth = false;
Modified:
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsSoapConnector.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsSoapConnector.java?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
---
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsSoapConnector.java
(original)
+++
servicemix/smx3/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsSoapConnector.java
Thu Jul 31 03:26:51 2008
@@ -18,6 +18,7 @@
import java.io.IOException;
import java.net.URL;
+import java.security.Security;
import javax.jbi.JBIException;
import javax.jbi.component.ComponentContext;
@@ -50,8 +51,14 @@
private String keyStorePassword;
private String keyStoreType = "JKS"; // type of the key store
private String protocol = "TLS";
- private String keyManagerFactoryAlgorithm = "SunX509"; // cert algorithm
- private String trustManagerFactoryAlgorithm = "SunX509"; // cert algorithm
+ // cert algorithm
+ private String keyManagerFactoryAlgorithm = Security.getProperty(
+ "ssl.KeyManagerFactory.algorithm") == null
+ ? "SunX509" : Security.getProperty("ssl.KeyManagerFactory.algorithm");
+ // cert algorithm
+ private String trustManagerFactoryAlgorithm = Security.getProperty(
+ "ssl.TrustManagerFactory.algorithm") == null
+ ? "SunX509" :
Security.getProperty("ssl.TrustManagerFactory.algorithm");
private boolean wantClientAuth = false;
private boolean needClientAuth = false;
Modified:
servicemix/smx3/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/reflection/ReflectionBindingTest.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/reflection/ReflectionBindingTest.java?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
---
servicemix/smx3/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/reflection/ReflectionBindingTest.java
(original)
+++
servicemix/smx3/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/reflection/ReflectionBindingTest.java
Thu Jul 31 03:26:51 2008
@@ -33,11 +33,11 @@
private SpringJBIContainer jbi;
public void testSendMessagesToJmsThenOutofJmsToReceiver() throws Exception
{
- Counter counter = (Counter)
((ProxyInOnlyBinding)jbi.getBean("proxyCounter")).createProxy();
+ Counter counter = (Counter)
((ProxyInOnlyBinding)jbi.getBean("proxyCounter")).createProxy();
for (int i = 1; i <= messageCount; i++) {
counter.increment();
}
- Thread.sleep(100);
+ Thread.sleep(2000);
SimpleCounter simpleCounter = (SimpleCounter) getBean("counter");
assertEquals(messageCount, simpleCounter.getValue() );
Modified: servicemix/smx3/trunk/core/servicemix-core/pom.xml
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/pom.xml?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/pom.xml (original)
+++ servicemix/smx3/trunk/core/servicemix-core/pom.xml Thu Jul 31 03:26:51 2008
@@ -147,7 +147,7 @@
<artifactId>geronimo-transaction</artifactId>
</dependency>
<dependency>
- <groupId>xstream</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
<dependency>
Modified:
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
---
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java
(original)
+++
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java
Thu Jul 31 03:26:51 2008
@@ -236,6 +236,14 @@
// Outbound connector
ActiveMQResourceAdapter outboundRa = new ActiveMQResourceAdapter();
outboundRa.setConnectionFactory(connectionFactory);
+ //
+ // We need to explicitly set the server url unless we use the
+ // default jms url, so set it.
+ //
+ if (outboundRa.getInfo().getServerUrl() == null) {
+ log.info("ActiveMQResourceAdapter server url was null.
Setting it to: " + jmsURL);
+ outboundRa.getInfo().setServerUrl(jmsURL);
+ }
ActiveMQManagedConnectionFactory mcf = new
ActiveMQManagedConnectionFactory();
mcf.setResourceAdapter(outboundRa);
managedConnectionFactory = (ConnectionFactory)
mcf.createConnectionFactory(getConnectionManager());
Modified:
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/PropertiesLoginModuleTest.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/PropertiesLoginModuleTest.java?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
---
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/PropertiesLoginModuleTest.java
(original)
+++
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/PropertiesLoginModuleTest.java
Thu Jul 31 03:26:51 2008
@@ -19,6 +19,7 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
+import java.security.Security;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
@@ -52,6 +53,20 @@
}
}
log.info("Path to login config: " + path);
+ //
+ // This test depends on the "policy.allowSystemProperty" security
+ // property being set to true. If we don't ensure it is set here,
+ // ibmjdk 5 SR2 will fail with the following message:
+ // "Unable to locate a login configuration".
+ //
+ try {
+ if
(!"true".equals(Security.getProperty("policy.allowSystemProperty"))) {
+ Security.setProperty("policy.allowSystemProperty", "true");
+ log.info("Reset security property 'policy.allowSystemProperty'
to 'true'");
+ }
+ } catch (SecurityException e) {
+ // Ignore.
+ }
}
public void testLogin() throws LoginException {
Modified:
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SecuredBrokerTest.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SecuredBrokerTest.java?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
---
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SecuredBrokerTest.java
(original)
+++
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SecuredBrokerTest.java
Thu Jul 31 03:26:51 2008
@@ -19,6 +19,7 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
+import java.security.Security;
import java.util.ArrayList;
import java.util.List;
@@ -58,6 +59,20 @@
}
}
LOG.info("Path to login config: " + path);
+ //
+ // This test depends on the "policy.allowSystemProperty" security
+ // property being set to true. If we don't ensure it is set here,
+ // ibmjdk 5 SR2 will fail with the following message:
+ // "Unable to locate a login configuration".
+ //
+ try {
+ if
(!"true".equals(Security.getProperty("policy.allowSystemProperty"))) {
+ Security.setProperty("policy.allowSystemProperty", "true");
+ LOG.info("Reset security property 'policy.allowSystemProperty'
to 'true'");
+ }
+ } catch (SecurityException e) {
+ // Ignore.
+ }
}
protected JBIContainer jbi;
Modified:
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SpringSecuredBrokerTest.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SpringSecuredBrokerTest.java?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
---
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SpringSecuredBrokerTest.java
(original)
+++
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/SpringSecuredBrokerTest.java
Thu Jul 31 03:26:51 2008
@@ -19,6 +19,7 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
+import java.security.Security;
import javax.jbi.messaging.InOnly;
import javax.security.auth.Subject;
@@ -54,6 +55,20 @@
}
}
LOG.info("Path to login config: " + path);
+ //
+ // This test depends on the "policy.allowSystemProperty" security
+ // property being set to true. If we don't ensure it is set here,
+ // ibmjdk 5 SR2 will fail with the following message:
+ // "Unable to locate a login configuration".
+ //
+ try {
+ if
(!"true".equals(Security.getProperty("policy.allowSystemProperty"))) {
+ Security.setProperty("policy.allowSystemProperty", "true");
+ LOG.info("Reset security property 'policy.allowSystemProperty'
to 'true'");
+ }
+ } catch (Exception e) {
+ // Ignore.
+ }
}
protected Receiver receiver1;
Modified: servicemix/smx3/trunk/core/servicemix-jbi/pom.xml
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-jbi/pom.xml?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-jbi/pom.xml (original)
+++ servicemix/smx3/trunk/core/servicemix-jbi/pom.xml Thu Jul 31 03:26:51 2008
@@ -39,6 +39,11 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-qname_1.1_spec</artifactId>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<profiles>
Modified: servicemix/smx3/trunk/core/servicemix-services/pom.xml
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-services/pom.xml?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-services/pom.xml (original)
+++ servicemix/smx3/trunk/core/servicemix-services/pom.xml Thu Jul 31 03:26:51
2008
@@ -52,7 +52,7 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>xstream</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<optional>true</optional>
</dependency>
Modified: servicemix/smx3/trunk/core/servicemix-utils/pom.xml
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-utils/pom.xml?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-utils/pom.xml (original)
+++ servicemix/smx3/trunk/core/servicemix-utils/pom.xml Thu Jul 31 03:26:51 2008
@@ -52,7 +52,7 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>xstream</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<optional>true</optional>
</dependency>
Modified: servicemix/smx3/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/pom.xml?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
--- servicemix/smx3/trunk/pom.xml (original)
+++ servicemix/smx3/trunk/pom.xml Thu Jul 31 03:26:51 2008
@@ -82,7 +82,7 @@
<spring-version>2.5.5</spring-version>
<activemq-version>5.1.0</activemq-version>
<activeio-version>3.1.0</activeio-version>
- <camel-version>1.4-SNAPSHOT</camel-version>
+ <camel-version>1.4.0</camel-version>
<jencks-version>2.1</jencks-version>
<jetty-version>6.1.6</jetty-version>
<geronimo-version>2.0.1</geronimo-version>
@@ -1686,9 +1686,9 @@
<version>2.1.0</version>
</dependency>
<dependency>
- <groupId>xstream</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
- <version>1.1.2</version>
+ <version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
@@ -1845,6 +1845,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
<configuration>
<useFile>true</useFile>
<forkMode>once</forkMode>
Modified:
servicemix/smx3/trunk/samples/loan-broker/loan-broker-drools-su/pom.xml
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/samples/loan-broker/loan-broker-drools-su/pom.xml?rev=681324&r1=681323&r2=681324&view=diff
==============================================================================
--- servicemix/smx3/trunk/samples/loan-broker/loan-broker-drools-su/pom.xml
(original)
+++ servicemix/smx3/trunk/samples/loan-broker/loan-broker-drools-su/pom.xml Thu
Jul 31 03:26:51 2008
@@ -82,4 +82,17 @@
</plugin>
</plugins>
</build>
+
+ <repositories>
+ <repository>
+ <id>JBOSS-Repository</id>
+ <url>http://repository.jboss.com/maven2/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
</project>