Bugs item #1008001, was opened at 2004-08-12 08:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1008001&group_id=22866
Category: JBossServer
Group: v4.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Rob Grzywinski (rgrzywinski)
Assigned to: Nobody/Anonymous (nobody)
Summary: NamingService.startService() assumes jndi.properties exists
Initial Comment:
server/src/main/org/jboss/naming/NamingService.java's
startService() assumes that "jndi.properties" exists in
the lines:
InputStream is = loader.getResourceAsStream
("jndi.properties");
Properties props = new Properties();
props.load(is);
If "jndi.properties" does not exist an NPE is thrown rather
than a more useful (sane) exception. The code would
be better served to read:
InputStream is = loader.getResourceAsStream
("jndi.properties");
if(is == null)
throw new WhateverTheStandardExceptionIs
(<"jndi.properties" could not be found. Ensure that it
exists in the conf directory.>);
/* else -- "jndi.properties" exists and was loaded */
Properties props = new Properties();
props.load(is);
Where the text in <>'s is replaced with whatever the
standard resource bundle mechanism is.
I would also like to point out that by
throwing "Exception" on "startService()" you are doing a
disservice to users of the application since exceptions
that may have otherwise caught and meaningful
messages provided are being bubbled out in their raw
state. I will save this battle for another day =D
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1008001&group_id=22866
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development