Commit 944149cc authored by Andre Freyssinet's avatar Andre Freyssinet
Browse files

Minor changes.

parent 17c056ef
......@@ -664,8 +664,7 @@ public class Connection implements javax.jms.Connection, ConnectionMBean {
}
if (sessionPool == null)
throw new JMSException("Invalid ServerSessionPool parameter: "
+ sessionPool);
throw new JMSException("Invalid ServerSessionPool parameter: " + sessionPool);
if (maxMessages <= 0)
throw new JMSException("Invalid maxMessages parameter: " + maxMessages);
......
......@@ -112,9 +112,10 @@ public class FactoryParameters implements java.io.Serializable, Cloneable {
*/
public int SoTimeout = 0;
/**
* Duration in seconds during which connecting is attempted (connecting
* might take time if the server is temporarily not reachable); the 0 value
* is set for connecting only once and aborting if connecting failed.
* Duration in seconds during which connecting is attempted (connecting might
* take time if the server is temporarily not reachable). A value of zero is
* interpreted as an infinite timeout. The connection will then block until
* established or a TCP error occurs.
* <p>
* The default value is 30.
*/
......@@ -371,9 +372,9 @@ public class FactoryParameters implements java.io.Serializable, Cloneable {
ref.add(new StringRefAddr(prefix + ".outLocalPort", new Integer(outLocalPort).toString()));
if (outLocalAddress != null)
ref.add(new StringRefAddr(prefix + ".outLocalAddress", outLocalAddress));
if (!inInterceptors.isEmpty())
if ((inInterceptors != null) && (!inInterceptors.isEmpty()))
ref.add(new StringRefAddr(prefix + ".inInterceptors", getListInInterceptorClassName()));
if (outInterceptors!=null)
if ((outInterceptors!=null) && (!outInterceptors.isEmpty()))
ref.add(new StringRefAddr(prefix + ".outInterceptors", getListOutInterceptorClassName()));
if (messageIdPrefix != null)
ref.add(new StringRefAddr(prefix + ".messageIdPrefix", messageIdPrefix));
......@@ -463,9 +464,9 @@ public class FactoryParameters implements java.io.Serializable, Cloneable {
h.put(prefix + ".outLocalPort", new Integer(outLocalPort));
if (outLocalAddress != null)
h.put(prefix + ".outLocalAddress", outLocalAddress);
if(inInterceptors!=null)
if ((inInterceptors != null) && (!inInterceptors.isEmpty()))
h.put(prefix + ".inInterceptors", getListInInterceptorClassName());
if(outInterceptors!=null)
if ((outInterceptors!=null) && (!outInterceptors.isEmpty()))
h.put(prefix + ".outInterceptors", getListOutInterceptorClassName());
if (messageIdPrefix != null)
h.put(prefix + ".messageIdPrefix", messageIdPrefix);
......@@ -568,7 +569,7 @@ public class FactoryParameters implements java.io.Serializable, Cloneable {
}
public void addOutInterceptor(String pInterceptorClassName) {
addInterceptor(pInterceptorClassName,outInterceptors);
addInterceptor(pInterceptorClassName, outInterceptors);
}
private void addInterceptor(String pInterceptorClassName, List pInterceptors) {
......@@ -615,7 +616,7 @@ public class FactoryParameters implements java.io.Serializable, Cloneable {
}
private String getListInterceptorClassName(List pInterceptors) {
if (!pInterceptors.isEmpty()) {
if ((pInterceptors != null) && (!pInterceptors.isEmpty())) {
StringBuffer cns = new StringBuffer();
for (Iterator it= pInterceptors.iterator();it.hasNext();) {
cns.append(it.next().getClass().getName());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment