Polishing

This commit is contained in:
Juergen Hoeller
2014-07-29 10:10:48 +02:00
parent daaeeaa8e2
commit c0a4631fd1
56 changed files with 845 additions and 794 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -384,7 +384,7 @@ public class SingleConnectionFactory
/**
* Create a default Session for this ConnectionFactory,
* adaptign to JMS 1.0.2 style queue/topic mode if necessary.
* adapting to JMS 1.0.2 style queue/topic mode if necessary.
* @param con the JMS Connection to operate on
* @param mode the Session acknowledgement mode
* ({@code Session.TRANSACTED} or one of the common modes)
@@ -443,7 +443,7 @@ public class SingleConnectionFactory
* @return the wrapped Connection
*/
protected Connection getSharedConnectionProxy(Connection target) {
List<Class> classes = new ArrayList<Class>(3);
List<Class<?>> classes = new ArrayList<Class<?>>(3);
classes.add(Connection.class);
if (target instanceof QueueConnection) {
classes.add(QueueConnection.class);
@@ -453,7 +453,7 @@ public class SingleConnectionFactory
}
return (Connection) Proxy.newProxyInstance(
Connection.class.getClassLoader(),
classes.toArray(new Class[classes.size()]),
classes.toArray(new Class<?>[classes.size()]),
new SharedConnectionInvocationHandler(target));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ import org.springframework.beans.BeanWrapper;
/**
* Default implementation of the {@link JmsActivationSpecFactory} interface.
* Supports the standard JMS properties as defined by the JMS 1.5 specification,
* Supports the standard JMS properties as defined by the JCA 1.5 specification,
* as well as Spring's extended "maxConcurrency" and "prefetchSize" settings
* through autodetection of well-known vendor-specific provider properties.
*
@@ -72,7 +72,7 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa
* "ActiveMQActivationSpec" in the same package, or a class named
* "ActivationSpecImpl" in the same package as the ResourceAdapter class.
*/
protected Class determineActivationSpecClass(ResourceAdapter adapter) {
protected Class<?> determineActivationSpecClass(ResourceAdapter adapter) {
String adapterClassName = adapter.getClass().getName();
if (adapterClassName.endsWith(RESOURCE_ADAPTER_SUFFIX)) {
@@ -156,7 +156,7 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa
// JORAM
bw.setPropertyValue("maxMessages", Integer.toString(config.getPrefetchSize()));
}
else if(bw.isWritableProperty("maxBatchSize")){
else if (bw.isWritableProperty("maxBatchSize")){
// WebSphere
bw.setPropertyValue("maxBatchSize", Integer.toString(config.getPrefetchSize()));
}

View File

@@ -50,7 +50,7 @@ import org.springframework.jms.support.destination.DestinationResolver;
*/
public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactory {
private Class activationSpecClass;
private Class<?> activationSpecClass;
private Map<String, String> defaultProperties;
@@ -61,7 +61,7 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
* Specify the fully-qualified ActivationSpec class name for the target
* provider (e.g. "org.apache.activemq.ra.ActiveMQActivationSpec").
*/
public void setActivationSpecClass(Class activationSpecClass) {
public void setActivationSpecClass(Class<?> activationSpecClass) {
this.activationSpecClass = activationSpecClass;
}
@@ -92,7 +92,7 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
public ActivationSpec createActivationSpec(ResourceAdapter adapter, JmsActivationSpecConfig config) {
Class activationSpecClassToUse = this.activationSpecClass;
Class<?> activationSpecClassToUse = this.activationSpecClass;
if (activationSpecClassToUse == null) {
activationSpecClassToUse = determineActivationSpecClass(adapter);
if (activationSpecClassToUse == null) {
@@ -117,7 +117,7 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
* if not determinable
* @see #setActivationSpecClass
*/
protected Class determineActivationSpecClass(ResourceAdapter adapter) {
protected Class<?> determineActivationSpecClass(ResourceAdapter adapter) {
return null;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -86,7 +86,7 @@ public abstract class JmsAccessor implements InitializingBean {
* <p>Setting this flag to "true" will use a short local JMS transaction
* when running outside of a managed transaction, and a synchronized local
* JMS transaction in case of a managed transaction (other than an XA
* transaction) being present. The latter has the effect of a local JMS
* transaction) being present. This has the effect of a local JMS
* transaction being managed alongside the main transaction (which might
* be a native JDBC transaction), with the JMS transaction committing
* right after the main transaction.
@@ -109,7 +109,7 @@ public abstract class JmsAccessor implements InitializingBean {
* Set the JMS acknowledgement mode by the name of the corresponding constant
* in the JMS {@link Session} interface, e.g. "CLIENT_ACKNOWLEDGE".
* <p>If you want to use vendor-specific extensions to the acknowledgment mode,
* use {@link #setSessionAcknowledgeModeName(String)} instead.
* use {@link #setSessionAcknowledgeMode(int)} instead.
* @param constantName the name of the {@link Session} acknowledge mode constant
* @see javax.jms.Session#AUTO_ACKNOWLEDGE
* @see javax.jms.Session#CLIENT_ACKNOWLEDGE
@@ -125,8 +125,8 @@ public abstract class JmsAccessor implements InitializingBean {
* {@link Session} to send a message.
* <p>Default is {@link Session#AUTO_ACKNOWLEDGE}.
* <p>Vendor-specific extensions to the acknowledgment mode can be set here as well.
* <p>Note that that inside an EJB the parameters to
* create(Queue/Topic)Session(boolean transacted, int acknowledgeMode) method
* <p>Note that that inside an EJB, the parameters to the
* {@code create(Queue/Topic)Session(boolean transacted, int acknowledgeMode)} method
* are not taken into account. Depending on the transaction context in the EJB,
* the container makes its own decisions on these values. See section 17.3.5
* of the EJB spec.