Oracle Fusion Middleware User Messaging Service 11.1.1.7.0 Java API Reference
E14011-05

oracle.sdp.messaging
Class ApplicationInfo

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by oracle.sdp.messaging.ApplicationInfo
All Implemented Interfaces:
Serializable, java.lang.Cloneable, Map<java.lang.Object,java.lang.Object>

public class ApplicationInfo
extends Properties
implements Serializable

Holds Client application properties. Used to supply information about the client application when creating a new MessagingClient instance. The information that can be set are the client application's name and its instance name, the JNDI info for authentication and registration with the Messaging Server, its receiving queues and message/status listener info for asynchronous receiving. This class provides the programmatic approach to setting the application information.

The recommended, declarative approach is via JNDI environment properties in the application's XML descriptor file (such as ejb-jar.xml, or application-client.xml, or web.xml). Simply copy/paste this snippet of XML in your application's XML descriptor (an understanding of J2EE application developoment/deployment is assumed) and replace all the tokens (starting and ending with "@") with appropriate values:

              <!-- Messaging Client Application Info Environment Properties [BEGIN] -->
  
              <!-- 
                  The MessagingClientFactory.createMessagingEJBClient() uses these properties, if specified, to register
                  the calling application's info with the Messaging Server. 
                  These values can also be overriden programmatically by setting the appropriate
                  properties in ApplicationInfo - passed to MessagingClientFactory.createMessagingEJBClient(ApplicationInfo).
              -->
  
              <!-- Configure the Messaging Client Application Name / Instance Name
              -->
              <env-entry>
                  <description>
                      <![CDATA[The name of the application.]]>
                  </description>
                  <env-entry-name>sdpm/ApplicationName</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value>@ApplicationName@</env-entry-value>
              </env-entry>
              <env-entry>
                  <description>
                      <![CDATA[The name of the application instance. Access Points registered
                      by an application are shared across all "instances" of the application.]]>
                  </description>
                  <env-entry-name>sdpm/ApplicationInstanceName</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value>@ApplicationInstanceName@</env-entry-value>
              </env-entry>
  
              <!--  (Optional) Configure the queue and listener info for asynchronous receiving of Message and Status. -->
              <env-entry>
                  <description>
                      <![CDATA[The Receiving Queues Information.
                      The format for the queue info string (BNF notation) is:
                      
                      queuesInfo := queue-info *(";" queue-info) 
                      
                      queue-info := queue-connection-factory-jndi-name ":" queue-jndi-name *("," queue-jndi-name) 
                      
                      Note: "*(element)" means zero or more occurrences of element. 
                      
                      Examples: 
                      * 1 queue connection factory with JNDI name "jms/MyQCF1" for 1 queue
                        with JNDI name "jms/sdpm/MyQ1":
                      
                        jms/MyQCF1:jms/sdpm/MyQ1 
                      
                      * 1 queue connection factory with JNDI name "jms/MyQCF1" for 2 queues
                        with JNDI names "jms/sdpm/MyQ1" and "jms/sdpm/MyQ2":
                      
                        jms/MyQCF1:jms/sdpm/MyQ1,jms/sdpm/MyQ2 
                      
                      * 1 queue connection factory with JNDI name "jms/MyQCF1" for 1 queue
                        with JNDI name "jms/sdpm/MyQ1" and another queue connection factory with
                        JNDI name "jms/MyQCF2" for a queue with JNDI name "jms/sdpm/MyQ2":
                      
                        jms/MyQCF1:jms/sdpm/MyQ1;jms/MyQCF2:jms/sdpm/MyQ2 
                      ]]>
                  </description>
                  <env-entry-name>sdpm/ReceivingQueuesInfo</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value>@ReceivingQueuesInfo@</env-entry-value>
              </env-entry>
  
              <env-entry>
                  <description>
                      <![CDATA[Message Listener Session Bean JNDI Name]]>
                  </description>
                  <env-entry-name>sdpm/MessageListenerSessionBeanJNDIName</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value>@messagelistener.sessionbean.jndi.name@</env-entry-value>
              </env-entry>
              <env-entry>
                  <description>
                      <![CDATA[Message Listener Session Bean Home Class Full Name]]>
                  </description>
                  <env-entry-name>sdpm/MessageListenerSessionBeanHomeClassName</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value>@messagelistener.sessionbean.home.class.name@</env-entry-value>
              </env-entry>
              <env-entry>
                  <description>
                      <![CDATA[Status Listener Session Bean JNDI Name]]>
                  </description>
                  <env-entry-name>sdpm/StatusListenerSessionBeanJNDIName</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value>@statuslistener.sessionbean.jndi.name@</env-entry-value>
              </env-entry>
              <env-entry>
                  <description>
                      <![CDATA[Status Listener Session Bean Home Class Full Name]]>
                  </description>
                  <env-entry-name>sdpm/StatusListenerSessionBeanHomeClassName</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value>@statuslistener.sessionbean.home.class.name@</env-entry-value>
              </env-entry>
  
              <!-- Configure JNDI Properties to access Messaging Server. 
                  The Messaging Client EJB library uses these properties to access the JNDI
                  naming context of the Messaging Server, as well as for the required security
                  context to access the Messaging APIs on behalf of the application. 
                  These values can also be overriden programmatically by setting the appropriate
                  properties in ApplicationInfo - passed to MessagingClientFactory.createMessagingEJBClient(ApplicationInfo).
                  
                  The default behavior of the EJB library, if these properties are not specified by 
                  the application, is to connect to the Messaging Server that is colocated on the same 
                  J2EE container using local/remote EJB access.
              -->
              
              <!-- Uncomment this section ONLY if the application is not colocated with the 
                  Messaging Server on the same J2EE container. -->
                  
              <!-- 
              
              <env-entry>
                  <description>
                      <![CDATA[The Messaging Client library uses the Messaging JNDI InitialFactory to connect to the JNDI naming context of the
                      Messaging Server on behalf of the application. The default value of this property, if not set is
                      "weblogic.jndi.WLInitialContextFactory".]]>
                  </description>
                  <env-entry-name>sdpm/JNDIInitialFactory</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value></env-entry-value>
              </env-entry>
              <env-entry>
                  <description>
                      <![CDATA[The Messaging Client library uses the Messaging JNDI Provider URL to access the 
                      JNDI naming context of the Messaging Server on behalf of the application. The default behavior,
                      if this property is not set (left blank):
                      On WebLogic Server: Use the default JNDI context.
                       
                      In general, the application must provide the JNDI Provider URL which is
                      appropriate to the J2EE server installation:
                      
                      For standalone client connecting to a Messaging Server on WebLogic Server, the form is
                      "t3://<host>:<port>"
                      ]]>
                  </description>
                  <env-entry-name>sdpm/ServerJNDIProviderURL</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value></env-entry-value>
              </env-entry>
              <env-entry>
                  <description>
                      <![CDATA[The Messaging Client library uses the Messaging Security Principal to access the JNDI
                      naming context of the Messaging Server, as well as for the required security
                      context to access the Messaging APIs on behalf of the application. In general,
                      the application must set the appropriate principal required to gain
                      access to the Messaging Server's context and access the Messaging APIs. This property
                      goes hand in hand with the Messaging Security Credentials.
                      ]]>
                  </description>
                  <env-entry-name>sdpm/SecurityPrincipal</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value></env-entry-value>
              </env-entry>
              <env-entry>
                  <description>
                      <![CDATA[The Messaging Client library uses the Messaging Security Crendentials to access the
                      JNDI naming context of the Messaging Server, as well as for the required
                      security context to access the Messaging APIs on behalf of the application. In
                      general, the application must set the appropriate credentials required to
                      gain access to the Messaging Server's context and access the Messaging APIs. This
                      property goes hand in hand with the Messaging Security Principal.
                      ]]>
                  </description>
                  <env-entry-name>sdpm/SecurityCredentials</env-entry-name>
                  <env-entry-type>java.lang.String</env-entry-type>
                  <env-entry-value></env-entry-value>
              </env-entry>
              
              -->
  
              <!-- Messaging Client Application Info Environment Properties [END] -->
   
 

Since:
11.0.0
See Also:
Serialized Form

Field Summary
static java.lang.String APPLICATION_INSTANCE_NAME
           
static java.lang.String APPLICATION_NAME
           
static java.lang.String DEFAULT_SDPM_JNDI_INITIAL_FACTORY
           
static java.lang.String DEFAULT_SDPM_JNDI_PROVIDER_URL
          The default SDP Messaging Server JNDI Provider URL is empty.
static java.lang.String DEFAULT_SDPM_SECURITY_CREDENTIALS
           
static java.lang.String DEFAULT_SDPM_SECURITY_PRINCIPAL
           
static java.lang.String DEFAULT_SERVER_NAME
           
static java.lang.String MESSAGE_LISTENER_SESSION_BEAN_HOME_CLASS_NAME
           
static java.lang.String MESSAGE_LISTENER_SESSION_BEAN_JNDI_NAME
           
static java.lang.String RECEIVING_QUEUES_INFO
           
static java.lang.String SDPM_JNDI_INITIAL_FACTORY
           
static java.lang.String SDPM_SECURITY_CREDENTIALS
           
static java.lang.String SDPM_SECURITY_PRINCIPAL
           
static java.lang.String SDPM_SERVER_JNDI_PROVIDER_URL
           
static java.lang.String STATUS_LISTENER_SESSION_BEAN_HOME_CLASS_NAME
           
static java.lang.String STATUS_LISTENER_SESSION_BEAN_JNDI_NAME
           
static java.lang.String VERSION
           
 
Constructor Summary
ApplicationInfo()
          Constructor
 
Method Summary
 java.lang.String getApplicationInstanceName()
           
 java.lang.String getApplicationName()
           
 java.lang.String getJNDIInitialFactory()
           
 java.lang.String getMessageListenerSessionBeanHomeClassName()
           
 java.lang.String getMessageListenerSessionBeanJNDIName()
           
 ArrayList<oracle.sdpinternal.messaging.config.QueueInfo> getReceivingQueues()
          This getter is for Messaging-internal use.
 java.lang.String getReceivingQueuesInfo()
          Get the receiving queues information.
 java.lang.String getSecurityCredentials()
           
 java.lang.String getSecurityPrincipal()
           
 java.lang.String getServerJNDIProviderURL()
           
 java.lang.String getStatusListenerSessionBeanHomeClassName()
           
 java.lang.String getStatusListenerSessionBeanJNDIName()
           
 void setApplicationInstanceName(java.lang.String applicationInstanceName)
           
 void setApplicationName(java.lang.String applicationName)
           
 void setJNDIInitialFactory(java.lang.String initialFactory)
          The Messaging Client library uses the JNDI InitialFactory to connect to the JNDI naming context of the Messaging Server on behalf of the application.
 void setMessageListenerSessionBeanHomeClassName(java.lang.String messageListenerSessionBeanHomeClassName)
           
 void setMessageListenerSessionBeanJNDIName(java.lang.String messageListenerSessionBeanJNDIName)
           
 void setReceivingQueues(ArrayList<oracle.sdpinternal.messaging.config.QueueInfo> receivingQueues)
          This setter is for Messaging-internal use.
 void setReceivingQueuesInfo(java.lang.String queuesInfo)
          Set the receiving queues information.
 void setSecurityCredentials(java.lang.String securityCredentials)
          The Messaging Client library uses the Messaging Security Crendentials to access the JNDI naming context of the Messaging Server, as well as for the required security context to access the Messaging APIs on behalf of the application.
 void setSecurityPrincipal(java.lang.String securityPrincipal)
          The Messaging Client library uses the Messaging Security Principal to access the JNDI naming context of the Messaging Server, as well as for the required security context to access the Messaging APIs on behalf of the application.
 void setServerJNDIProviderURL(java.lang.String providerURL)
          The Messaging Client library uses the Messaging Server JNDI Provider URL to access the JNDI naming context of the Messaging Server on behalf of the application.
 void setStatusListenerSessionBeanHomeClassName(java.lang.String statusListenerSessionBeanHomeClassName)
           
 void setStatusListenerSessionBeanJNDIName(java.lang.String statusListenerSessionBeanJNDIName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

APPLICATION_NAME

public static final java.lang.String APPLICATION_NAME
See Also:
Constant Field Values

APPLICATION_INSTANCE_NAME

public static final java.lang.String APPLICATION_INSTANCE_NAME
See Also:
Constant Field Values

RECEIVING_QUEUES_INFO

public static final java.lang.String RECEIVING_QUEUES_INFO
See Also:
Constant Field Values

MESSAGE_LISTENER_SESSION_BEAN_JNDI_NAME

public static final java.lang.String MESSAGE_LISTENER_SESSION_BEAN_JNDI_NAME
See Also:
Constant Field Values

MESSAGE_LISTENER_SESSION_BEAN_HOME_CLASS_NAME

public static final java.lang.String MESSAGE_LISTENER_SESSION_BEAN_HOME_CLASS_NAME
See Also:
Constant Field Values

STATUS_LISTENER_SESSION_BEAN_JNDI_NAME

public static final java.lang.String STATUS_LISTENER_SESSION_BEAN_JNDI_NAME
See Also:
Constant Field Values

STATUS_LISTENER_SESSION_BEAN_HOME_CLASS_NAME

public static final java.lang.String STATUS_LISTENER_SESSION_BEAN_HOME_CLASS_NAME
See Also:
Constant Field Values

SDPM_SECURITY_PRINCIPAL

public static final java.lang.String SDPM_SECURITY_PRINCIPAL
See Also:
Constant Field Values

SDPM_SECURITY_CREDENTIALS

public static final java.lang.String SDPM_SECURITY_CREDENTIALS
See Also:
Constant Field Values

SDPM_JNDI_INITIAL_FACTORY

public static final java.lang.String SDPM_JNDI_INITIAL_FACTORY
See Also:
Constant Field Values

SDPM_SERVER_JNDI_PROVIDER_URL

public static final java.lang.String SDPM_SERVER_JNDI_PROVIDER_URL
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

DEFAULT_SDPM_SECURITY_PRINCIPAL

public static final java.lang.String DEFAULT_SDPM_SECURITY_PRINCIPAL

DEFAULT_SDPM_SECURITY_CREDENTIALS

public static final java.lang.String DEFAULT_SDPM_SECURITY_CREDENTIALS
See Also:
Constant Field Values

DEFAULT_SDPM_JNDI_INITIAL_FACTORY

public static final java.lang.String DEFAULT_SDPM_JNDI_INITIAL_FACTORY
See Also:
Constant Field Values

DEFAULT_SERVER_NAME

public static final java.lang.String DEFAULT_SERVER_NAME
See Also:
Constant Field Values

DEFAULT_SDPM_JNDI_PROVIDER_URL

public static final java.lang.String DEFAULT_SDPM_JNDI_PROVIDER_URL
The default SDP Messaging Server JNDI Provider URL is empty. The sdpmessagingserver is accessed using local EJB or discovered using RDS-based JNDI lookup depending on the JNDI Initial Factory.

See Also:
Constant Field Values
Constructor Detail

ApplicationInfo

public ApplicationInfo()
Constructor

Method Detail

getApplicationInstanceName

public java.lang.String getApplicationInstanceName()
Returns:
returns the applicationInstanceName.

setApplicationInstanceName

public void setApplicationInstanceName(java.lang.String applicationInstanceName)
Parameters:
applicationInstanceName - the applicationInstanceName to set.

getApplicationName

public java.lang.String getApplicationName()
Returns:
returns the applicationName.

setApplicationName

public void setApplicationName(java.lang.String applicationName)
Parameters:
applicationName - the applicationName to set.

getJNDIInitialFactory

public java.lang.String getJNDIInitialFactory()
Returns:
returns the Messaging Server JNDI InitialFactory.

setJNDIInitialFactory

public void setJNDIInitialFactory(java.lang.String initialFactory)
The Messaging Client library uses the JNDI InitialFactory to connect to the JNDI naming context of the Messaging Server on behalf of the application. The default value of this property, if not set is "weblogic.jndi.WLInitialContextFactory".

Parameters:
initialFactory - the JNDI InitialFactory to set.

getServerJNDIProviderURL

public java.lang.String getServerJNDIProviderURL()
Returns:
returns the Messaging Server JNDI Provider URL.

setServerJNDIProviderURL

public void setServerJNDIProviderURL(java.lang.String providerURL)
The Messaging Client library uses the Messaging Server JNDI Provider URL to access the JNDI naming context of the Messaging Server on behalf of the application. The default behavior, if this property is not set: In general, the application must provide the JNDI Provider URL which is appropriate to the J2EE server installation:

Parameters:
providerURL - the Messaging Server JNDI Provider URL to set.

getSecurityCredentials

public java.lang.String getSecurityCredentials()
Returns:
returns the Messaging Security Credentials.

setSecurityCredentials

public void setSecurityCredentials(java.lang.String securityCredentials)
The Messaging Client library uses the Messaging Security Crendentials to access the JNDI naming context of the Messaging Server, as well as for the required security context to access the Messaging APIs on behalf of the application. In general, the application must set the appropriate credentials required to gain access to the Messaging Server's context and access the Messaging APIs. This property goes hand in hand with the Messaging Security Principal.

Parameters:
securityCredentials - the Messaging Security Credentials to set.
See Also:
setSecurityPrincipal(String)

getSecurityPrincipal

public java.lang.String getSecurityPrincipal()
Returns:
returns the Messaging Security Principal.

setSecurityPrincipal

public void setSecurityPrincipal(java.lang.String securityPrincipal)
The Messaging Client library uses the Messaging Security Principal to access the JNDI naming context of the Messaging Server, as well as for the required security context to access the Messaging APIs on behalf of the application. In general, the application must set the appropriate principal required to gain access to the Messaging Server's context and access the Messaging APIs. This property goes hand in hand with the Messaging Security Credentials.

Parameters:
securityPrincipal - the Messaging Security Principal to set.
See Also:
setSecurityCredentials(String)

getReceivingQueuesInfo

public java.lang.String getReceivingQueuesInfo()
Get the receiving queues information.

Returns:
returns the receivingQueuesInfo.

setReceivingQueuesInfo

public void setReceivingQueuesInfo(java.lang.String queuesInfo)
Set the receiving queues information.

The format for the queuesInfo string (BNF notation) is:

queuesInfo := queue-info *(";" queue-info)

queue-info := queue-connection-factory-jndi-name ":" queue-jndi-name *("," queue-jndi-name)

Note: "*(element)" means zero or more occurrences of element.

Examples:


getReceivingQueues

public ArrayList<oracle.sdpinternal.messaging.config.QueueInfo> getReceivingQueues()
This getter is for Messaging-internal use. Please get the receiving queues info using getReceivingQueuesInfo().

Returns:
returns the receivingQueues.

setReceivingQueues

public void setReceivingQueues(ArrayList<oracle.sdpinternal.messaging.config.QueueInfo> receivingQueues)
This setter is for Messaging-internal use. Please set the receiving queues info using setReceivingQueuesInfo(String).

Parameters:
receivingQueues - the receivingQueues to set.

getMessageListenerSessionBeanHomeClassName

public java.lang.String getMessageListenerSessionBeanHomeClassName()
Returns:
returns the messageListenerSessionBeanHomeClassName.

setMessageListenerSessionBeanHomeClassName

public void setMessageListenerSessionBeanHomeClassName(java.lang.String messageListenerSessionBeanHomeClassName)
Parameters:
messageListenerSessionBeanHomeClassName - the messageListenerSessionBeanHomeClassName to set.

getMessageListenerSessionBeanJNDIName

public java.lang.String getMessageListenerSessionBeanJNDIName()
Returns:
returns the messageListenerSessionBeanJNDIName.

setMessageListenerSessionBeanJNDIName

public void setMessageListenerSessionBeanJNDIName(java.lang.String messageListenerSessionBeanJNDIName)
Parameters:
messageListenerSessionBeanJNDIName - the messageListenerSessionBeanJNDIName to set.

getStatusListenerSessionBeanHomeClassName

public java.lang.String getStatusListenerSessionBeanHomeClassName()
Returns:
returns the statusListenerSessionBeanHomeClassName.

setStatusListenerSessionBeanHomeClassName

public void setStatusListenerSessionBeanHomeClassName(java.lang.String statusListenerSessionBeanHomeClassName)
Parameters:
statusListenerSessionBeanHomeClassName - the statusListenerSessionBeanHomeClassName to set.

getStatusListenerSessionBeanJNDIName

public java.lang.String getStatusListenerSessionBeanJNDIName()
Returns:
returns the statusListenerSessionBeanJNDIName.

setStatusListenerSessionBeanJNDIName

public void setStatusListenerSessionBeanJNDIName(java.lang.String statusListenerSessionBeanJNDIName)
Parameters:
statusListenerSessionBeanJNDIName - the statusListenerSessionBeanJNDIName to set.

toString

public java.lang.String toString()
Overrides:
toString in class Hashtable<java.lang.Object,java.lang.Object>

Oracle Fusion Middleware User Messaging Service 11.1.1.7.0 Java API Reference
E14011-05

Copyright © 2009, 2013 Oracle and/or its affiliates. All rights reserved.