org.codehaus.activespace.jms
Class JndiJmsSpaceFactory

java.lang.Object
  extended byorg.codehaus.activespace.jms.JmsSpaceFactory
      extended byorg.codehaus.activespace.jms.JndiJmsSpaceFactory
All Implemented Interfaces:
SpaceFactory

public class JndiJmsSpaceFactory
extends JmsSpaceFactory

An implementation of SpaceFactory which uses JMS and will lookup the ConnectionFactory in JNDI using some lookup name

Version:
$Revision: 1.2 $

Field Summary
 
Fields inherited from interface org.codehaus.activespace.SpaceFactory
DISPATCH_ALL_CONSUMERS, DISPATCH_ONE_CONSUMER, DISPATCH_ONE_CONSUMER_EXCLUSIVE
 
Constructor Summary
JndiJmsSpaceFactory()
           
JndiJmsSpaceFactory(String jndiLookupName)
           
 
Method Summary
protected  ConnectionFactory createConnectionFactory()
           
protected  InitialContext createInitialContext()
          Factory method to create the initial JNDI context allowing derived classes to use some custom location etc
 String getJndiLookupName()
           
 void setJndiLookupName(String jndiLookupName)
           
 
Methods inherited from class org.codehaus.activespace.jms.JmsSpaceFactory
createConnection, createSpace, getAcknowledgeMode, getConnection, getConnectionFactory, getDeliveryMode, getMarshaller, getPassword, getPriority, getUser, isTransacted, onSpaceClose, onSpaceStart, setAcknowledgeMode, setConnection, setConnectionFactory, setDeliveryMode, setMarshaller, setPassword, setPriority, setTransacted, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiJmsSpaceFactory

public JndiJmsSpaceFactory()

JndiJmsSpaceFactory

public JndiJmsSpaceFactory(String jndiLookupName)
Method Detail

getJndiLookupName

public String getJndiLookupName()

setJndiLookupName

public void setJndiLookupName(String jndiLookupName)

createConnectionFactory

protected ConnectionFactory createConnectionFactory()
                                             throws JMSException,
                                                    SpaceException
Overrides:
createConnectionFactory in class JmsSpaceFactory
Throws:
JMSException
SpaceException

createInitialContext

protected InitialContext createInitialContext()
                                       throws NamingException
Factory method to create the initial JNDI context allowing derived classes to use some custom location etc

Returns:
a newly created initial context
Throws:
NamingException


Copyright © 2004 Protique, Ltd.. All Rights Reserved.