Java Doc for JMSConnectionFactory.java in  » ESB » synapse » org » apache » synapse » transport » jms » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » synapse » org.apache.synapse.transport.jms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.synapse.transport.jms.JMSConnectionFactory

JMSConnectionFactory
public class JMSConnectionFactory implements ExceptionListener(Code)
Encapsulate a JMS Connection factory definition within an Axis2.xml

More than one JMS connection factory could be defined within an Axis2 XML specifying the JMSListener as the transportReceiver.

These connection factories are created at the initialization of the transportReceiver, and any service interested in using any of these could specify the name of the factory and the destination through Parameters named JMSConstants.CONFAC_PARAM and JMSConstants.DEST_PARAM as shown below.

myQueueConnectionFactory TestQueue

If a connection factory is defined by a parameter named JMSConstants.DEFAULT_CONFAC_NAME in the Axis2 XML, services which does not explicitly specify a connection factory will be defaulted to it - if it is defined in the Axis2 configuration.

e.g. org.apache.activemq.jndi.ActiveMQInitialContextFactory tcp://localhost:61616 TopicConnectionFactory myTopicOne, myTopicTwo org.apache.activemq.jndi.ActiveMQInitialContextFactory tcp://localhost:61616 QueueConnectionFactory myQueueOne, myQueueTwo org.apache.activemq.jndi.ActiveMQInitialContextFactory tcp://localhost:61616 ConnectionFactory myDestinationOne, myDestinationTwo




Constructor Summary
public  JMSConnectionFactory(String name, ConfigurationContext cfgCtx)
    

Method Summary
public  voidaddDestination(String destinationJNDIName, String destinationType, String serviceName)
    
public  voidaddJNDIContextProperty(String key, String value)
    
public synchronized  voidconnectAndListen()
     Begin [or restart] listening for messages on the list of destinations associated with this connection factory.
public  booleanequals(Object o)
    
public  ConnectionFactorygetConFactory()
    
public  StringgetConnFactoryJNDIName()
    
public  StringgetConnectionFactoryType()
    
public  ContextgetContext()
    
public  DestinationgetDestination(String destinationJNDIName)
    
public  EndpointReferencegetEPRForDestination(String jndiDestination)
    
public  JMSMessageReceivergetJmsMessageReceiver()
    
public  HashtablegetJndiProperties()
    
public  StringgetName()
    
public  longgetReconnectTimeout()
    
public  StringgetServiceNameForDestination(Destination dest, String jmsDestinationName)
    
public  StringgetServiceNameForDestinationName(String jmsDestinationName)
    
public  StringgetServiceNameForJNDIName(String jndiDestinationName)
    
public  SessiongetSessionForDestination(String destinationJNDIname)
    
public  voidonException(JMSException e)
    
public  voidremoveDestination(String jndiDestinationName)
    
public  voidsetConnFactoryJNDIName(String connFactoryJNDIName)
    
public  voidsetConnectionFactoryType(String connectionFactoryType)
    
public  voidsetJmsMessageReceiver(JMSMessageReceiver jmsMessageReceiver)
    
public  voidsetReconnectTimeout(long reconnectTimeout)
    
public  voidstartListeningOnDestination(String destinationJNDIname, String destinationType)
     Listen on the given destination from this connection factory.
public  voidstop()
     Close all connections, sessions etc..


Constructor Detail
JMSConnectionFactory
public JMSConnectionFactory(String name, ConfigurationContext cfgCtx)(Code)
Create a JMSConnectionFactory for the given [axis2] name the JNDI name of the actual ConnectionFactory
Parameters:
  name - the connection factory name specified in the axis2.xml for theTransportListener or the TransportSender using this
Parameters:
  cfgCtx - the axis2 configuration context




Method Detail
addDestination
public void addDestination(String destinationJNDIName, String destinationType, String serviceName)(Code)
Add a listen destination on this connection factory on behalf of the given service
Parameters:
  destinationJNDIName - destination JNDI name
Parameters:
  serviceName - the service to which it belongs



addJNDIContextProperty
public void addJNDIContextProperty(String key, String value)(Code)



connectAndListen
public synchronized void connectAndListen() throws JMSException, NamingException(Code)
Begin [or restart] listening for messages on the list of destinations associated with this connection factory. (Called during Axis2 initialization of the Transport receivers, or after a disconnection has been detected) When called from the JMS transport sender, this call simply acquires the actual JMS connection factory from the JNDI, creates a new connection and starts it.
throws:
  JMSException - on exceptions
throws:
  NamingException - on exceptions



equals
public boolean equals(Object o)(Code)
Is this connection factory referring to the same underlying connection factory passed in
Parameters:
  o - a JMSOutTransport object which specifies a connection factory true if this instance could be substituted for the out-transport



getConFactory
public ConnectionFactory getConFactory()(Code)



getConnFactoryJNDIName
public String getConnFactoryJNDIName()(Code)



getConnectionFactoryType
public String getConnectionFactoryType()(Code)



getContext
public Context getContext()(Code)



getDestination
public Destination getDestination(String destinationJNDIName)(Code)



getEPRForDestination
public EndpointReference getEPRForDestination(String jndiDestination)(Code)
Return the EPR for the JMS Destination with the given JNDI name when using this connection factory
Parameters:
  jndiDestination - the JNDI name of the JMS Destionation the EPR for a service using this destination



getJmsMessageReceiver
public JMSMessageReceiver getJmsMessageReceiver()(Code)



getJndiProperties
public Hashtable getJndiProperties()(Code)



getName
public String getName()(Code)



getReconnectTimeout
public long getReconnectTimeout()(Code)



getServiceNameForDestination
public String getServiceNameForDestination(Destination dest, String jmsDestinationName)(Code)
Return the service name using the JMS destination and its JNDI name
Parameters:
  dest - the JMS Destination Queue or Topic
Parameters:
  jmsDestinationName - the JMS destination name the name of the service using the destination



getServiceNameForDestinationName
public String getServiceNameForDestinationName(String jmsDestinationName)(Code)
Return the service name using the JMS destination given by the JNDI name
Parameters:
  jmsDestinationName - the JMS destination name the name of the service using the destination



getServiceNameForJNDIName
public String getServiceNameForJNDIName(String jndiDestinationName)(Code)
Return the service name using the JMS destination given by the JNDI name
Parameters:
  jndiDestinationName - the JNDI name of the destination the name of the service using the destination



getSessionForDestination
public Session getSessionForDestination(String destinationJNDIname)(Code)
Create a session for sending to the given destination and save it on the jmsSessions Map keyed by the destinatin JNDI name
Parameters:
  destinationJNDIname - the destination JNDI name a JMS Session to send messages to the destination using this connection factory



onException
public void onException(JMSException e)(Code)



removeDestination
public void removeDestination(String jndiDestinationName)(Code)
Abort listening on the JMS destination from this connection factory
Parameters:
  jndiDestinationName - the JNDI name of the JMS destination to be removed



setConnFactoryJNDIName
public void setConnFactoryJNDIName(String connFactoryJNDIName)(Code)



setConnectionFactoryType
public void setConnectionFactoryType(String connectionFactoryType)(Code)



setJmsMessageReceiver
public void setJmsMessageReceiver(JMSMessageReceiver jmsMessageReceiver)(Code)



setReconnectTimeout
public void setReconnectTimeout(long reconnectTimeout)(Code)



startListeningOnDestination
public void startListeningOnDestination(String destinationJNDIname, String destinationType)(Code)
Listen on the given destination from this connection factory. Used to start listening on a destination associated with a newly deployed service
Parameters:
  destinationJNDIname - the JMS destination to listen on



stop
public void stop()(Code)
Close all connections, sessions etc.. and stop this connection factory



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.