Announcement Announcement Module
Collapse
No announcement yet.
(Tricky part) Spring beans and jar files Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • (Tricky part) Spring beans and jar files

    Hello All,

    I must say spring makes me very happy everyday, but i have one serious question.

    Currently we are developing a pluggable WWW aplication using JSP, Tomcat etc...
    One thing we are doing are pluggable modules which are simply jar files.
    Each jar file contains classes and one spring beans xml to tie them all.
    So.. nothing special, but we encounter big problem when we want to tell spring to read these xmls from jar files.
    Say we have 20 modules, each one is jar file consisting of several classes and one spring beans xml.
    What i want to do is to force spring to read all of them from jar file just like it is possible for regular file system xmls with ClassPathXMLApplicationContext.
    Is it possible to tell spring which jars im interested in and what exact xmls retrieve from each jar to process it by spring just like any other regular xml beans file ???
    I would like pass a regExp or ant style wildcard to choose which jar files should be processed and another wildcard expression to pick exact xml to process. it would be great !

    If anybody can help us...

    Peter

  • #2
    Have you looked at the classpath loaders? Like:

    Code:
    ApplicationContext ctx =
        new ClassPathXmlApplicationContext("classpath*:conf/appContext.xml");
    There are several threads in this forum on this, such as, http://forum.springframework.org/showthread.php?t=16447
    Last edited by robyn; May 14th, 2006, 07:42 PM.

    Comment

    Working...
    X