• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

changing BEA weblogic 9.2 environment values

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an EAR file (HelloWorld.ear) which is deployed on the BEA Weblogic 9.2 Server.
The HelloWorld.ear file has an EJB (Hello.java) with the code...

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
initialContext = new InitialContext(env);
System.out.println(initialContext.lookup("java:comp/env/MY-NAME"));


and in my ejb-jar.xml file, the value is set as follows

<env-entry>
<description>My Name is returned back</description>
<env-entry-name>MY-NAME</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>ABC</env-entry-value>
</env-entry>


The problem statement is that after deploying the HelloWorld.ear on BEA Weblogic 9.2 Server,
I want to change the value of the environmental entry ABC to XYZ from a standalone class. The
"java:comp/env" which is probably the bea's env file from which the value is being read (as
seen the Hello.java code).

This is to make sure that i can have seprate class file or boot strap class which can run
and update my config paramters in my apps when changes are made without redeploying my application.

Please let me know how this can be done. Thank you.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sanju, please check your private messages.
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic