- This topic has 5 replies, 3 voices, and was last updated 17 years ago by Riyad Kalla.
-
AuthorPosts
-
csargentParticipantHi
I have a question about hot deployment/exploded deployment as it relates to an Enterprise Application project that has Java Projects upon which it depends.
I have the a workspace with the following layout:
– EARProj (Enterprise Application Project)
– WebProj (Web Project)
– EJBProj (EJB Project)
– JProject1 (Java Project)
– JProject2 (Java Project)JProject1 and JProject2 contain common classes needed by both WebProj and EJBProj.
I have set up the EARProj to have each of the other 4 as dependencies. When I use the EAR file options to jar dependent projects, and add classpath entries in the EAR file manifest for JProject1 and JProject2, the deployed application works just as I would hope — JProject1.jar and JProject2.jar are included in the root of the ear file (or ear file *directory* if I use exploded deployment) and everything works just fine.
What I *want* to do, is create this same structure but use an exploded directory format for the dependent projects (i.e., *directories* named JProject1.jar and JProject2.jar in the EAR root) so that Eclipse will replace individual classes in JProject1 and JProject2 as I make changes to them. I can’t seem to figure out the right combination of settings to get this working. Is this possible?
Thanks in Advance
Chris
Loyal WaterMemberIf you use the smart deployment policy for the dependent projects under the deployment tab under Preferences, the changes in the dependent projects would also get deployed automatically.
csargentParticipantThanks for the quick reply. I saw the Smart Deployment option you note, but only in the web project (i.e., not in the EAR project).
I tried using this setting in the web project, and the classes from the dependent project are merged into the WEB-INF classes directory of the web project. This is fine for the web application but does not make these common classes visible to the EJBProject.
What I am looking for is a way to have the common classes (from JProject1 and JProject2) available to both the Web Project *and* the EJB project at runtime *and* have those common classes deployed in an exploded format.
Thanks!
Chris
Loyal WaterMemberI saw the Smart Deployment option you note, but only in the web project (i.e., not in the EAR project).
The EAR projects also have this option. You can go to Windows > Preferences > MyEclipse > Java Enterprise Project > EAR Project and select “Jar Dependent Java Projects”.
csargentParticipantRight — as I said, I found that option.
Enabling it results in jar *files* with the dependent classes in my EAR root. This allows the application to run ok, but I can’t hot swap the classes in the dependent projects as I debug.
What I want is an not jar files but rather exploded *directories* named (using my example from above) Jproject1.jar and JProject2.jar. Is what I am trying to do clear?
Riyad KallaMembercsargent,
Sorry for not being more clear earlier… we don’t support this. MyEclipse deployment runs on the paradigm that EARs can only contain JARs of classes that need to be exposed on the classpath to the modules contained in the EAR, I don’t blieve (in EE 5) there is a directory in an EAR structure that can accept exploded classes.So as you change your classes that are part of a JAR in an EAR, MyEclipse cannot deploy simply those changed classes or re-create the JAR on the fly and have the app server reliably reload it. At the moment you would need to restart the app to pick the changes *specifically* for the JARs that are dependencies of the EAR.
-
AuthorPosts