ContextType

Description

Allows a reference to a JNDI context and/or a JNDI entry to be declared once and re-used across other JndiLookup tasks using their contextref attribute.

Parameters

Attribute Description Required
serverType The type of server involved. Valid values are weblogic, jboss, or jboss.ejb. The setting of this value determines the default value for the jndiName and providerUrl attributes.

NOTE:If this value is other than weblogic, jboss, or jboss.ejb then it is assumed to be a fully qualified class name that implements org.apache.tools.ant.taskdefs.optional.jmx.connector.JMXConnector. This is used to support additional types of servers without modifying the Ant JMX task classes.
Yes
providerUrl The JNDI providerUrl for the MBean server. If serverType is set to weblogic, the default value is t3://localhost:7001. If serverType is set to jboss, the default value is jnp://localhost:1099. No
jndiName The JNDI name for the server. If serverType is set to weblogic, the default value is weblogic.management.adminhome. If serverType is set to jboss, the default value is jmx:<hostname>:rmi. No
user The user name used for authentication with the server. No
password The password used for authentication with the server. No

Examples

Declares a reference to an JNDI context and uses it to test the existence of a JNDI entry:
<context id="adminhome" serverType="weblogic" user="system" password="secret"
jndiName="weblogic.management.adminhome"/>

<jndiLookup contextref="adminhome" property="adminhome.exists"/>
<echo message="${adminhome.exists}"/>

$Id: ContextType.html,v 1.2 2003/05/27 12:07:01 bdueck Exp $

Copyright © 2002 Apache Software Foundation. All rights Reserved.