One method we have used successfully is to define the
objects you want to bind in XML. Then create an
Application Server startup class that parses the XML,
creates the objects and binds them to JNDI.

For example:

<CLASS2JNDI
classname="com.nicholas.rules.MyMarketRules"
jndiname="/rules/MarketRule"/>

This XML entry causes the startup class to instantiate
an object of type com.nicholas.rules.MyMarketRules nd
bind it to /rules/MarketRule.

We also have another tag:

 <LDAP2JNDI ldaploc="cn=fi-etrade-dev1-QCF,ou=ibm_us"
jndiname="/jms/factories/fi-etrade-dev1-QCF" />

This tag will cause the startup class to perform
lookup against our LDAP server, grab the object at
"cn=fi-etrade-dev1-QCF,ou=ibm_us"  and bind it to
/jms/factories/fi-etrade-dev1-QCF.

Works quite well. If your app server does not support
startup classes, you can use the init method of a
singleton servlet marked for immediate initialization.

//Nicholas
--- Ramki <[EMAIL PROTECTED]> wrote:
> I want to bind some information other than simple
> Strings to the JNDI.This
> information is specific to each EJB. Ideally it
> would be better if I can bind
> some Object itself or an XML which has its own
> DTD.Any ideas on how to do this?
>
> Ramki.
>
> bye,
> Ramki.
> 81-3-5476-1105(O)
> NEC,Minato-Ku,Tokyo-108557.
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff EJB-INTEREST".  For general
> help, send email to
> [EMAIL PROTECTED] and include in the body of the
> message "help".
>


=====
Nicholas Whitehead
Home: (973) 377 9335
Cell: (201) 615 2716
Work: (212) 622 5639
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to