summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-jms-runtime
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-10-16 12:43:47 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-10-16 12:43:47 +0000
commit6109b6819a0186526b7d7b9088089137eba3a35e (patch)
tree23fe884bacfe52ce0d17448f0c4879a274a860fb /java/sca/modules/binding-jms-runtime
parent82801263538c6f23f379b54b2eb1b68e960b26e7 (diff)
Change private to protected so class can be subclassed
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@705229 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-jms-runtime')
-rw-r--r--java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java b/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
index 6efcb2010f..d0624fb52e 100644
--- a/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
+++ b/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
@@ -39,13 +39,13 @@ import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
*/
public class JMSResourceFactoryImpl implements JMSResourceFactory {
- private String initialContextFactoryName;
- private String connectionFactoryName = "ConnectionFactory";
- private String jndiURL;
+ protected String initialContextFactoryName;
+ protected String connectionFactoryName = "ConnectionFactory";
+ protected String jndiURL;
- private Connection connection;
- private Context context;
- private boolean isConnectionStarted;
+ protected Connection connection;
+ protected Context context;
+ protected boolean isConnectionStarted;
public JMSResourceFactoryImpl(String connectionFactoryName, String initialContextFactoryName, String jndiURL) {
if (connectionFactoryName != null && connectionFactoryName.trim().length() > 0) {
@@ -114,7 +114,7 @@ public class JMSResourceFactoryImpl implements JMSResourceFactory {
}
}
- private void createConnection() throws NamingException, JMSException {
+ protected void createConnection() throws NamingException, JMSException {
ConnectionFactory connectionFactory = (ConnectionFactory)jndiLookUp(connectionFactoryName);
if (connectionFactory == null) {
throw new JMSBindingException("connection factory not found: " + connectionFactoryName);
@@ -122,7 +122,7 @@ public class JMSResourceFactoryImpl implements JMSResourceFactory {
connection = connectionFactory.createConnection();
}
- private synchronized Context getInitialContext() throws NamingException {
+ protected synchronized Context getInitialContext() throws NamingException {
if (context == null) {
Properties props = new Properties();
@@ -145,7 +145,7 @@ public class JMSResourceFactoryImpl implements JMSResourceFactory {
* environment property needs to be set to initialize the ORB correctly.
* See: http://www-1.ibm.com/support/docview.wss?uid=swg24012804
*/
- private void initJREEnvironment(Properties props) {
+ protected void initJREEnvironment(Properties props) {
if ("com.ibm.websphere.naming.WsnInitialContextFactory".equals(props.get(Context.INITIAL_CONTEXT_FACTORY))) {
String vendor = System.getProperty("java.vendor");
if (vendor == null || !vendor.contains("IBM")) {
@@ -208,7 +208,7 @@ public class JMSResourceFactoryImpl implements JMSResourceFactory {
Object o = null;
try {
o = getInitialContext().lookup("java:comp/env/" + name);
- } catch (NamingException ex) {
+ } catch (Exception ex) {
// ignore
}
if (o == null) {