-
1. Re: Bootstrap a spring application context in JBoss AS7.1
nickarls Nov 12, 2012 1:54 AM (in response to tosaravananm)Without knowing the problem in detail, would it be an option to have a JBoss module and dependencies from the SARs to that module?
-
2. Re: Bootstrap a spring application context in JBoss AS7.1
tosaravananm Nov 12, 2012 2:17 AM (in response to nickarls)Actually the sar(my-comp1-app.sar) file has dependency on my custom module custom.lib(where i have the jar file containing bootstrap class SpringBootstrapBean). The problem is, SpringBootstrapBean is not able to load the
"META-INF/applicationContext.xml"
file located in the my-comp1-app.sar. It throws file not found!. -
3. Re: Bootstrap a spring application context in JBoss AS7.1
nickarls Nov 12, 2012 2:21 AM (in response to tosaravananm)Accessing files directly in Java EE is a bit tricky. Can you use the classloader getResourceAsStream for the actual loading? Have you tried using a File object to check with getAbsolutePath to see which path is actually is trying to load?
-
4. Re: Bootstrap a spring application context in JBoss AS7.1
tosaravananm Nov 12, 2012 4:09 AM (in response to nickarls)Thanks Nicklas Karlsson. No luck. TCCL and SpringBootstrapBean class loader are same.
In short, here is actual scenario.
I have a class(SpringBootstrapBean.class) associated to a custom module(module1), and i have a sar deployer (my-app-comp.sar) having a dependency on module1.
my-app-comp.sar has jboss-service.xml and applicationContext.xml. jboss-service.xml has an mbean entry for SpringBootstrapBean.class. SpringBootstrapBean does not have visibility to access the applicationContext.xml placed inside my-app-comp.sar.
-
5. Re: Bootstrap a spring application context in JBoss AS7.1
tosaravananm Nov 12, 2012 4:53 AM (in response to tosaravananm)problem is similar to https://community.jboss.org/thread/196485