LocalProducerFactorypublic class LocalProducerFactory extends ProducerFactory
Fields Summary |
---|
protected String | factoryName |
Constructors Summary |
---|
public LocalProducerFactory(ConsumerContainer container, Class producer, org.jboss.annotation.ejb.MessageProperties props, javax.jms.Destination dest, InitialContext ctx, Hashtable icProperties)
super(container, producer, props, dest, ctx, icProperties);
try
{
factoryName = pImpl.connectionFactory();
if (factoryName.equals("")) factoryName = "java:/ConnectionFactory";
}
catch (Exception e)
{
throw new RuntimeException(e);
}
|
Methods Summary |
---|
public java.lang.Object | createProxy()
Class[] interfaces = {producer, ProducerObject.class};
ProducerManagerImpl mImpl = null;
mImpl = new ProducerManagerImpl(pImpl, dest, factoryName, props.delivery(), props.timeToLive(), props.priority(), methodMap, initialContextProperties);
Interceptor[] interceptors = {mImpl};
ProducerProxy ih = new ProducerProxy(mImpl, interceptors);
return java.lang.reflect.Proxy.newProxyInstance(producer.getClassLoader(), interfaces, ih);
| public void | start()
super.start();
try{
NonSerializableFactory.rebind(ctx, jndiName + PROXY_FACTORY_NAME, this);
} catch (NamingException e)
{
NamingException namingException = new NamingException("Could not bind local producer factory with name " + factoryName + " into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
namingException.setRootCause(e);
throw namingException;
}
| public void | stop()
super.stop();
NonSerializableFactory.unbind(ctx, jndiName + PROXY_FACTORY_NAME);
|
|