Meaningless Drivel is fun!
The moose likes Websphere and the fly likes Adjusting ejb-jar.xml settings with Admin UI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Adjusting ejb-jar.xml settings with Admin UI" Watch "Adjusting ejb-jar.xml settings with Admin UI" New topic

Adjusting ejb-jar.xml settings with Admin UI

Terry Jeske

Joined: Apr 06, 2004
Posts: 17
I am fairly new to WS, and am working on an application where a previous developer added code that looked at the ejb-jar.xml file for settings. I guess the hope was/is that certain values can be adjusted w/o a redeploy. However, I cannot find any place on the production environment to adjust these values. Does anyone know if it is possible to ajust these values through some sort of UI on the Admin Console? (our client wants to fiddle with some settings).
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
Most of the settings in ejb-jar.xml and web.xml are modifiable through the normal administration or deployment of an application. If you would list the code where the developer performed data driven development, I think we could tell you how to mod the app or appserver.
Terry Jeske

Joined: Apr 06, 2004
Posts: 17
Hi thx for the response,
Still getting my feet wet with WS, so I am not quite sure what you were asking for. Here is the node in the ejb-jar.xml entry. the value that is being read is for blockSize.
<session id="SequenceSession">
<env-entry id="EnvEntry_14">
<env-entry id="EnvEntry_15">
It is read using the following method in
* setSessionContext
public void setSessionContext(javax.ejb.SessionContext ctx) {
mySessionCtx = ctx;
try {
javax.naming.Context namingContext = new javax.naming.InitialContext();
Object o1 = namingContext.lookup("java:comp/env/blockSize");
Object o2 = namingContext.lookup("java:comp/env/retryCount");
_blockSize = ((Integer) namingContext.lookup("java:comp/env/blockSize")).intValue();
_retryCount = ((Integer) namingContext.lookup("java:comp/env/retryCount")).intValue();

_sequenceHome = (il.dba.ejb.eb.SequenceHome) namingContext.lookup("il/dba/ejb/eb/SequenceHome");
catch(javax.naming.NamingException e) {
throw new javax.ejb.EJBException(e);
Hope that is what you were looking for.
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
In ejb-jar.xml these are in DTD syntax
<!ELEMENT env-entry (description?, env-entry-name, env-entry-type,
where in your case something like
env-entry-name == blockSize
env-entry-type == java.lang.Integer
env-entry-value == 10
Normally this value is set at deployment.
On a given machine the deployment descriptor might be located in a
directory like
Now a client can edit this file, stop the application, and restart it through the admin console.
I think that this possible. Hopefully one of the gurus will correct me if I am wrong.
I agree. Here's the link:
subject: Adjusting ejb-jar.xml settings with Admin UI
It's not a secret anymore!