This closes #111 - fixing build and refactoring around getFactory methods
This commit is contained in:
commit
6612320792
|
@ -50,7 +50,7 @@ public class TCPTransportConfigurationSchema extends AbstractTransportConfigurat
|
|||
@Override
|
||||
protected List<TransportConfiguration> internalNewObject(URI uri, Map<String, String> query, String name) throws Exception
|
||||
{
|
||||
return getTransportConfigurations(uri, query, allowableProperties, name, getFactoryName());
|
||||
return getTransportConfigurations(uri, query, allowableProperties, name, getFactoryName(uri));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,8 +88,13 @@ public class TCPTransportConfigurationSchema extends AbstractTransportConfigurat
|
|||
return transportConfigurations;
|
||||
}
|
||||
|
||||
protected String getFactoryName()
|
||||
protected String getFactoryName(URI uri)
|
||||
{
|
||||
//here for backwards compatibility
|
||||
if (uri.getPath() != null && uri.getPath().contains("hornetq"))
|
||||
{
|
||||
return "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory";
|
||||
}
|
||||
return NettyConnectorFactory.class.getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
package org.apache.activemq.jndi;
|
||||
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.Topic;
|
||||
import javax.naming.Context;
|
||||
|
@ -27,7 +28,6 @@ import java.util.Map;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.apache.activemq.api.jms.ActiveMQJMSClient;
|
||||
import org.apache.activemq.jms.client.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.uri.ConnectionFactoryParser;
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory
|
|||
String jndiName = key.substring(connectionFactoryPrefix.length());
|
||||
try
|
||||
{
|
||||
ActiveMQConnectionFactory factory = createConnectionFactory((String) environment.get(key), jndiName);
|
||||
ConnectionFactory factory = createConnectionFactory((String) environment.get(key), jndiName);
|
||||
data.put(jndiName, factory);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -175,7 +175,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory
|
|||
/**
|
||||
* Factory method to create a new connection factory from the given environment
|
||||
*/
|
||||
protected ActiveMQConnectionFactory createConnectionFactory(String uri, String name) throws Exception
|
||||
protected ConnectionFactory createConnectionFactory(String uri, String name) throws Exception
|
||||
{
|
||||
ConnectionFactoryParser parser = new ConnectionFactoryParser();
|
||||
return parser.newObject(parser.expandURI(uri), name);
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
package org.apache.activemq.uri;
|
||||
|
||||
import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +31,7 @@ public class TCPAcceptorTransportConfigurationSchema extends TCPTransportConfigu
|
|||
super(allowableProperties);
|
||||
}
|
||||
|
||||
public String getFactoryName()
|
||||
public String getFactoryName(URI uri)
|
||||
{
|
||||
return NettyAcceptorFactory.class.getName();
|
||||
}
|
||||
|
|
|
@ -128,12 +128,6 @@
|
|||
<artifactId>activemq-website</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-website</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>javadoc</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies -->
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue