-
1. Re: very very advanced seam internal code question classloading
deanhiller2000 Jun 3, 2009 11:59 PM (in response to deanhiller2000)yup, definitely a classloader issue.....I now have to stick jboss-seam.jar in jboss/server/default/lib directory to make this run and can now only run one monolithic application in jboss....our EJB jar is too big to have in each application.
NOTE: I tried to take the annotations out of seam jar but they were tied to ScopeType which in turn was tied to Contexts :(...if only these annotations where a separate jar, I could just have the annotation jar in the lib directory and all apps could then share my EJB layer.
Dean
-
2. Re: very very advanced seam internal code question classloading
jeanluc Jun 4, 2009 5:14 AM (in response to deanhiller2000)Which class loader was it? Perhaps it was the one added by Seam to support hot redeployment of classes?
-
3. Re: very very advanced seam internal code question classloading
deanhiller2000 Jun 4, 2009 4:22 PM (in response to deanhiller2000)nope, I don't use the hotdeploy stuff and it didn't step into hot deploy scanner really as I don't have a dev directory.
I believe it is basically the jboss classloader. Since the seam annotations are in jboss-seam.jar(though I wish they were not), and jboss-seam.jar HAS to go in the war file as you cannot use the same seam in different war files due to all the static stuff, jboss-seam.jar and it's @Name annotation are in the war's classloader I believe and the xcore3.jar which is NOT inthe war file can't see those classes. If only I could move the annotations to the jboss common lib directory, this would all work, but when I tried to do that, @Scope was dependendent on enum ScopeType which was dependent on Contexts which depended on everything :(....
currently we now run one monolithic war file since we are forced to. We have our war file and other jboss services using the ejb jar file in the deploy directory. If the annotations could be pulled out of the seam-jboss.jar, that would be a big help. From looking at the code, looks like Pete Muir wrote this part of Scanning for jar files and what not. I am still not sure why my ejb classes can be seen from the war file's seam jar but then the ejb classes can't see back to the war file's seam jar...this is a bit weird to me unless the ejb classloader is a parent classloader. I am not sure at how to look at the cl heirarchy in debug mode...anyone know?
-
4. Re: very very advanced seam internal code question classloading
swd847 Jun 5, 2009 2:14 AM (in response to deanhiller2000)Which version of jboss are you using?
I you are up for trying something experimental I created a patch to allow seam to correctly run multiple WAR files in the same EAR. This patch should also allow you to share the seam libs between applications, as long as they all have a different application name (see the comments in the JIRA, I have not actually tested this). The patch can be found here (multi-war-appname1.diff).
I think that if you give every war file a different application name it should work, at the very least it should allow you to package up all your wars into an ear.
Stuart
-
5. Re: very very advanced seam internal code question classloading
deanhiller2000 Jun 5, 2009 4:36 AM (in response to deanhiller2000)sorry, nothing personal, but I can't stand ear files. After using osgi for a while, I saw how enterprise app servers should really be including how classloaders should really be done....hopefully someday jboss will catch up there. We stick with wars and jars on our projects so that we can redeploy stuff without redeploying the other applications......man, I wish jboss would catch up to knopflerfish as a really nice osgi implementation...still a ways to go I think.
we are on jboss 5.0.1.
later,
Dean