• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Issue with [env-entry] element in Weblogic 6.1 descriptors...

Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know it's possible to define <env-entry> elements in web.xml for environment properties of a web application. But how do you access <env-entry> elements from classes that do not exist within a web application? In other words, this is my problem:
I have an EAR file, enterprise.ear, which contains the following...
The employee.jar file is a utility archive that contains common classes, one of which is a class called LogManager. LogManager needs to read environment properties in order to initialize itself. Currently, LogManager reads these properties from a property file, and therefore it needs to know the name of the property file in order to access it. I dont like this approach because I'm forced to hard-code the name of the property file in LogManager. I would rather leverage the power of J2EE deployment descriptors and use the <env-entry> element to define the environment properties for the LogManager class. Then, I would simply use JNDI to get the values of the <env-entry> elements without ever having to specify their location aside from the default JNDI context; java:comp/env, which is standard anyway.
The problem I'm having is that you can define the <env-entry> element in only 2 types of deployment descriptors; namely, web.xml and ejb-jar.xml, neither of which are available to LogManager because LogManager exists at the EAR root level. I was hoping application.xml supported the <env-entry> element, but it doesn't.
Any suggestions?
[ March 01, 2002: Message edited by: SAFROLE YUTANI ]
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic