Hi,
How to load my application jar from javaExtensions...
Problem:
1) Currently I am loading all jars from smartfox_pro/server/lib....location....
My application has spring dependencies and lots of spring configuration xml files...all embedded inside jar file...
I am using ClassPathXmlApplicationContext to load spring configuration file from inside jars and its working fine....so far no problem...app is loading fine and everything is working as expected....
2) Now I am creating another application..But my spring configuration folder structure is same as the above application....
ie, app1: application1/config/dev/spring.xml
app2: application2/config/dev/spring.xml
Only the application name differs, but the configration folder structure is same.....
Now the prblem is, ClassPathXmlApplicationContext loads files using the classloader, So already app1 deployed and its config xml files also loaded,
Since the second apps config file names are also same as the first app...ClassPathXmlApplicationContext just ignores the second app xml files and its taking the first app configuration files.....this is because both apps are loaded using the same cloassloader...
So I tried changing the xml file names...and everything started working fine....But I don't want this behavior...I want to maintain a consistent structure for all my applications....It seems javaExtensions folder is not loaded in the begining and all extensions loaded from javaExtensions has their own independent classloader..So I just want to use this approach....I want to know how to load jars from javaExtensions folder...is there any way to accompolish this????????....I also tried exploded dir structure..But the problem with this approach is that since hibernate pojos and xmls are loaded based on the classpath again loading seems to be a problem....
Loading jars from javaExtensions folder
Re: Loading jars from javaExtensions folder
I am sorry, I am not familiar with Spring. Any jar that should be seen in the system should be deployed in the lib/ folder
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 42 guests