Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

changing BEA weblogic 9.2 environment values  RSS feed

 
sanju pushpangadan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sanju, please check your private messages.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!