JndiXAConnectionFactory (Bitronix Transaction Manager :: Core 2.1.4 API)
Date: 2013-09-15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## bitronix.tm.resource.jms
Class JndiXAConnectionFactory

    java.lang.Object
      bitronix.tm.resource.jms.JndiXAConnectionFactory

All Implemented Interfaces:
  javax.jms.XAConnectionFactory

    public class JndiXAConnectionFactory

extends Object
implements javax.jms.XAConnectionFactory

`XAConnectionFactory` implementation that wraps another `XAConnectionFactory` implementation available in some JNDI tree.

Author:
  lorban

Constructor Summary
`JndiXAConnectionFactory()`

Method Summary
`javax.jms.XAConnection` | `createXAConnection()`
`javax.jms.XAConnection` | `createXAConnection(String userName, String password)`
`Properties` | `getExtraJndiProperties()` The extra JNDI environment properties added the the `InitialContext`'s environment upon creation.
`String` | `getInitialContextFactory()` The `Context.INITIAL_CONTEXT_FACTORY` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`String` | `getName()` The JNDI name under which the `XAConnectionFactory` is available.
`String` | `getProviderUrl()` The `Context.PROVIDER_URL` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`String` | `getSecurityCredentials()` The `Context.SECURITY_CREDENTIALS` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`String` | `getSecurityPrincipal()` The `Context.SECURITY_PRINCIPAL` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`String` | `getUrlPkgPrefixes()` The `Context.URL_PKG_PREFIXES` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`protected void` | `init()`
`boolean` | `isNarrowJndiObject()` Should `PortableRemoteObject.narrow(Object, Class)` be applied on the object looked up from JNDI before trying to cast it to `XAConnectionFactory` ?
`void` | `setExtraJndiProperties(Properties extraJndiProperties)` Set the extra JNDI environment properties added the the `InitialContext`'s environment upon creation.
`void` | `setInitialContextFactory(String initialContextFactory)` Set the `Context.INITIAL_CONTEXT_FACTORY` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`void` | `setName(String name)` Set the JNDI name under which the `XAConnectionFactory` is available.
`void` | `setNarrowJndiObject(boolean narrowJndiObject)` Set if `PortableRemoteObject.narrow(Object, Class)` should be applied on the object looked up from JNDI before trying to cast it to `XAConnectionFactory` ?
`void` | `setProviderUrl(String providerUrl)` Set the `Context.PROVIDER_URL` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`void` | `setSecurityCredentials(String securityCredentials)` Set the `Context.SECURITY_CREDENTIALS` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`void` | `setSecurityPrincipal(String securityPrincipal)` Set the `Context.SECURITY_PRINCIPAL` of the JNDI `Context` used to fetch the `XAConnectionFactory`.
`void` | `setUrlPkgPrefixes(String urlPkgPrefixes)` Set the `Context.URL_PKG_PREFIXES` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JndiXAConnectionFactory

    public JndiXAConnectionFactory()

Method Detail

### getInitialContextFactory

    public String getInitialContextFactory()

  The `Context.INITIAL_CONTEXT_FACTORY` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

  Returns:
    the `Context.INITIAL_CONTEXT_FACTORY` value.

### setInitialContextFactory

    public void setInitialContextFactory(String initialContextFactory)

  Set the `Context.INITIAL_CONTEXT_FACTORY` of the JNDI `Context` used to fetch the `XAConnectionFactory`. If not set, the `Context` is created without the environment parameter, using the default constructor. This means all other properties (providerUrl, urlPkgPrefixes, extraJndiProperties...) are then ignored.

  Parameters:
    `initialContextFactory` - the `Context.INITIAL_CONTEXT_FACTORY` value.

### getProviderUrl

    public String getProviderUrl()

  The `Context.PROVIDER_URL` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

  Returns:
    the `Context.PROVIDER_URL` value.

### setProviderUrl

    public void setProviderUrl(String providerUrl)

  Set the `Context.PROVIDER_URL` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

  Parameters:
    `providerUrl` - the `Context.PROVIDER_URL` value.

### getUrlPkgPrefixes

    public String getUrlPkgPrefixes()

  The `Context.URL_PKG_PREFIXES` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

  Returns:
    the `Context.URL_PKG_PREFIXES` value.

### setUrlPkgPrefixes

    public void setUrlPkgPrefixes(String urlPkgPrefixes)

  Set the `Context.URL_PKG_PREFIXES` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

  Parameters:
    `urlPkgPrefixes` - the `Context.URL_PKG_PREFIXES` value.

### getSecurityPrincipal

    public String getSecurityPrincipal()

  The `Context.SECURITY_PRINCIPAL` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

  Returns:
    the `Context.SECURITY_PRINCIPAL` value.

### setSecurityPrincipal

    public void setSecurityPrincipal(String securityPrincipal)

  Set the `Context.SECURITY_PRINCIPAL` of the JNDI `Context` used to fetch the `XAConnectionFactory`. If `Context.INITIAL_CONTEXT_FACTORY` and `Context.PROVIDER_URL` are not set, this value is ignored.

  Parameters:
    `securityPrincipal` - the `Context.SECURITY_PRINCIPAL` value.

### getSecurityCredentials

    public String getSecurityCredentials()

  The `Context.SECURITY_CREDENTIALS` of the JNDI `Context` used to fetch the `XAConnectionFactory`.

  Returns:
    the `Context.SECURITY_CREDENTIALS` value.

### setSecurityCredentials

    public void setSecurityCredentials(String securityCredentials)

  Set the `Context.SECURITY_CREDENTIALS` of the JNDI `Context` used to fetch the `XAConnectionFactory`. If `Context.INITIAL_CONTEXT_FACTORY` and `Context.PROVIDER_URL` are not set, this value is ignored.

  Parameters:
    `securityCredentials` - the `Context.SECURITY_CREDENTIALS` value.

### getName

    public String getName()

  The JNDI name under which the `XAConnectionFactory` is available.

  Returns:
    The JNDI name.

### setName

    public void setName(String name)

  Set the JNDI name under which the `XAConnectionFactory` is available.

  Parameters:
    `name` - the JNDI name.

### getExtraJndiProperties

    public Properties getExtraJndiProperties()

  The extra JNDI environment properties added the the `InitialContext`'s environment upon creation.

  Returns:
    The extra JNDI environment properties.

### setExtraJndiProperties

    public void setExtraJndiProperties(Properties extraJndiProperties)

  Set the extra JNDI environment properties added the the `InitialContext`'s environment upon creation.

  Parameters:
    `extraJndiProperties` - The extra JNDI environment properties.

### isNarrowJndiObject

    public boolean isNarrowJndiObject()

  Should `PortableRemoteObject.narrow(Object, Class)` be applied on the object looked up from JNDI before trying to cast it to `XAConnectionFactory` ?

  Returns:
    true if the object should be narrowed, false otherwise.

### setNarrowJndiObject

    public void setNarrowJndiObject(boolean narrowJndiObject)

  Set if `PortableRemoteObject.narrow(Object, Class)` should be applied on the object looked up from JNDI before trying to cast it to `XAConnectionFactory` ?

  Parameters:
    `narrowJndiObject` - true if the object should be narrowed, false otherwise.

### init

    protected void init()
                 throws NamingException

  Throws:
    `NamingException`

### createXAConnection

    public javax.jms.XAConnection createXAConnection()
                                              throws javax.jms.JMSException

  Specified by:
    `createXAConnection` in interface `javax.jms.XAConnectionFactory`
  Throws:
    `javax.jms.JMSException`

### createXAConnection

    public javax.jms.XAConnection createXAConnection(String userName,
                                                     String password)
                                              throws javax.jms.JMSException

  Specified by:
    `createXAConnection` in interface `javax.jms.XAConnectionFactory`
  Throws:
    `javax.jms.JMSException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Bitronix Software. All Rights Reserved.