[jboss-user] [EJB/JBoss] - Re: PostConstruct loadClass fails when porting to JBoss 5

jcstaff2 do-not-reply at jboss.com
Mon Jul 27 16:29:25 EDT 2009


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. However...

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?

We can come up with ways to get around obtaining the classloader to dynamically load a class, but I don't currently know of a way to avoid getting the classloader for reading on streams/files. 

thanks,
jim


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246296#4246296

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246296



More information about the jboss-user mailing list