Class: com.sybase.djc.ant.BindProperty (Bind Property) | EAServer 6.3 Help |
---|
Description |
Binds a JNDI lookup name to a component or resource.
Each component and each package has its own private naming context, and the server has a global naming context. The setProperties "component" or "package" parameter is used to determine which naming context the binding is made in. It is usual to create bindings at the "package" level. All package-level bindings for local and remote interfaces are copied into the global naming context. If two packages bind the same name to different components, the order of binding into the global naming context is unspecified. The global naming context is used to resolve lookups from remote clients. Component and package level naming contexts are used to resolve lookups from EJB and web components. Bindings for resources are not exported outside of the naming context in which they are made. Bindings can be made explicitly into the global context by applying them to an "application server" or "cluster". This is useful, for example, if you want to assign a global JNDI name to a SQL data source or a JMS resource. Alternatively, bindings can be made in the naming context for an "application client". The properties used exclusively for this purpose are: lookup, ejbLookup, jmsLookup, factory, url, principal, credentials. |
---|---|
Configuration |
Package Binding Example:
<setProperties package="ejb.components.example"> <bind name="myapp/MyComp" component="ejb.components.example.MyCompRemoteHome"/> <bind name="myapp/MyOtherComp" interface="com.example.bank.MyOtherHome"/> <bind name="java:comp/env/ejb/MyComp" component="ejb.components.example.MyCompRemoteHome"/> <bind name="java:comp/env/jdbc/MyDataSource" dataSource="default"/> <bind name="java:comp/env/mail/MyMailSession" mailSession="default"/> <bind name="java:comp/env/jms/MyCF" jmsConnectionFactory="default"/> <bind name="java:comp/env/jms/MyQueue" messageQueue="abc"/> ... </setProperties>Application Client Example: <setProperties applicationClient="my-client"> <bind name="java:comp/env/jdbc/MyDataSource" dataSource="default"/> <bind name="java:comp/env/ejb/MyOtherComp" url="iiop://myhost:2000" ejbLookup="myapp/MyOtherComp"/> </setProperties>Application Server Example: <setProperties applicationServer="my-server"> <bind name="MyDataSource" dataSource="default"/> </setProperties> |
Nested Properties | administeredObject, component, connectionFactory, credentials, dataSource, ejbLookup, factory, interface, jmsConnectionFactory, jmsLookup, lookup, mailSession, messageQueue, messageTopic, name, principal, queueConnectionFactory, stub, topicConnectionFactory, url |
Property: administeredObject (JCA Administered Object) | |
---|---|
Description | Name of a JCA Administered Object to be bound. |
Property: connectionFactory (JCA Connection Factory) | |
---|---|
Description | Name of a JCA Connection Factory to be bound. |
Property: credentials (Security Credentials (Password))) | |
---|---|
Description | JNDI Security Credentials (password) to be used for accessing remote JNDI provider. |
Property: dataSource (JDBC Data Source) | |
---|---|
Description | Name of a JDBC Data Source to be bound. |
Property: ejbLookup (EJB Lookup) | |
---|---|
Description | Shortcut for lookup where factory is preset to "com.sybase.jms.client.InitialContextFactory". |
Property: factory (Initial Context Factory) | |
---|---|
Description | Initial context factory class for remote JNDI provider. |
Property: jmsConnectionFactory (JMS Connection Factory) | |
---|---|
Description | Name of a JMS Connection Factory to be bound. |
Property: jmsLookup (JMS Lookup) | |
---|---|
Description | Shortcut for lookup where factory is preset to "com.sybase.ejb.client.InitialContextFactory". |
Property: lookup (Lookup) | |
---|---|
Description | Name of object to lookup in remote JNDI provider, so that object can be copied into application client's naming context. If you set this, you must also set factory. |
Property: mailSession (Java Mail Session) | |
---|---|
Description | Name of a Java Mail Session to be bound. |
Property: messageQueue (JMS Message Queue) | |
---|---|
Description | Name of a JMS Message Queue to be bound. |
Property: messageTopic (JMS Message Topic) | |
---|---|
Description | Name of a JMS Message Topic to be bound. |
Property: name (Name) | |
---|---|
Description | The JNDI lookup name. |
Property: principal (Security Principal (Username)) | |
---|---|
Description | JNDI Security Principal (username) to be used for accessing remote JNDI provider. |
Property: queueConnectionFactory (JMS Queue Connection Factory) | |
---|---|
Description | Name of a JMS Queue Connection Factory to be bound. |
Property: stub (Stub) | |
---|---|
Description |
Forces the use of a stub for inter-component calls. Normally,
inter-component calls are made directly between lightweight
components.
Using this property will slow down inter-component calls, but it may be convenient for avoiding ClassCastException when making calls between components in separately deployed modules. Another alternative is to set the appropriate classPath to enable common loading of classes in the class loader for each deployed module. |
Default Value | false |
Legal Values | false, true |
Property: topicConnectionFactory (JMS Topic Connection Factory) | |
---|---|
Description | Name of a JMS Topic Connection Factory to be bound. |
Property: url (Provider URL) | |
---|---|
Description | JNDI Provider URL for remote JNDI provider. |