Can you store your information in the plain format?
In this case you can do it in 2 ways:

1. your_props.properties file. You can create this file (parameter=value)
and add into any directory that is included into classpath. Then you can
retrieve it in Java by:
PropertyResourceBundle configBundle =
(PropertyResourceBundle)PropertyResourceBundle.getBundle("your_props");
String param1 = configBundle.getString("param1");

2. <env-entry> tag:
<!--
This element contains a single environment property.
The property is only accessible from the Init.
-->
<env-entry>
<description>
Description of the parameter.
</description>
<!--
The JNDI location that Init uses to look up
the environment property.
-->
<env-entry-name>Init/myParam</env-entry-name>
<!-- The type for this environment property -->
<env-entry-type>java.lang.String</env-entry-type>
<!-- The environment property value -->
<env-entry-value>myValue</env-entry-value>
</env-entry>

In Java:
Context ctx = new InitialContext();
String myParam = (String) ctx.lookup("java:comp/env/Init/myParam");




To all: Is variant 1 correct from the EJB specification point of view?

Igor.


-----Original Message-----
From: Vikram Naik [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 13, 2002 7:07 AM
To: [EMAIL PROTECTED]
Subject: [EJB-INT] how to access config file from an ear in weblogic 7.0


Hello,

        We are having problems accessing  configuration file (which is in
xml
format) from an ear in weblogic 7.0.
We store configuration for datasource , jndi names  and necessary mapping in
this file.

Please guide me through.

TIA
Vikram Naik

===========================================================================
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".

===========================================================================
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