Andrew,
* Thanks for the specifics on why the handling of deployment descriptor
whitespace changed. Yes, with a more-compliant application server schema, I
was adding the extra whitespace - point taken.
* We are all set on the reading of a read-only resource.
* Tom Marrs wrote about 3
I understand where your caution comes from about the ClassLoader after reading
the spec, but when I read the Javadoc on getClass().getResource(), it sounds
like it too is locating the ClassLoader. When I did some searching, I found
that Tom Marrs (Lead Author, JBoss at Work: A Practical Guide)
jcstaff2 wrote : I understand where your caution comes from about the
ClassLoader after reading the spec, but when I read the Javadoc on
getClass().getResource(), it sounds like it too is locating the ClassLoader.
The difference is in your definition of the.
jcstaff2 wrote : When I did some searching, I found that Tom Marrs (Lead
Author, JBoss at Work: A Practical Guide) had the same solution as I did as
late as 2006. http://www.coderanch.com/t/89900/JBoss/reading-properties-file
Respectfully disagree.
Tom Marrs wrote : The EJB specification
Thank you for the reference to the specific spec requirement that explains why
this is allowed to not to work. The legacy code was from a time (EJB 2.x) when
dependency injection was more limited, and it may have advanced to the point
that we can inject the POJO class dynamically in other ways.
Hey Jim:
jcstaff2 wrote : If obtaining the current classloader is
illegal/non-portable, how does one read in a data file from the EJB's
classpath? Is there a legal classloader we can access that will have the file
Resource that can be read in as a stream?
In general, use of File (and other
Can you do some more debugging / logging?
e.g. print out TCCL in 4.x vs. 5.x in that code
It might just be a bug in not setting TCCL properly.
Or what does the spec say about what should the TCCL be in this case?
View the original post :
alesj wrote : Or what does the spec say about what should the TCCL be in this
case?
EJB 3.0 Specification 21.1.2: Programming Restrictions wrote : The enterprise
bean must not attempt to create a class loader; obtain the current class
loader; set the context class loader; set security manager;