Link to home
Create AccountLog in
Java App Servers

Java App Servers

--

Questions

--

Followers

Top Experts

Avatar of rahulkothari
rahulkothari

Settting up a EAR Project in WSAD.
HI Guru,

I am stuck here so someone might really help me.

I have an .ear file which has the following


(a) .war file.
(b) .jar file. (Project Utility Jar's)
(c) .jar files (Utility Jar's )

I have more than one projects so we have to have many .ear files.

Now here is the problem.

With each .ear we keep all the Utility Jar files under the .ear eg. commons-beanutil.jar,commons-deigester.jar.
Now the same .jar are replaced across all .ear file since they are contained in the .ear file.

Thus if we upgrade a version it is a headache since other projects want to get the newer version. - and the newer version is only local to this .ear file.

It is getting ugly since the applications (.ears) are increasing ...

If anyone can figure out a way where we can have a common repository all the Utitly Jar files which can used across all the .ear files it will be great ....

Thanx a lot,

RK

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of boonlengboonleng🇲🇾

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of boonlengboonleng🇲🇾

WSAD > Server Configuration > Paths > Class Path > Add External JARs

I don't recommend using "Add External JARs" because it may cause classloader issues down the road.  It can also conflict with the server's jar files.

Better, and more standard approach:

For WAS 4.x, pub your jars in <appserver home>/lib/app directory.  Do the same in your WSAD environment.  The path is a little different:  <WSAD home>plugins\com.ibm.etools.websphere.runtime\lib\app.

Then in your web and EJB projects, right click the project, do "java build path", then on the "libraries" tab, click "add variable".  There will be a variable like WAS_PLUGINDIR (depends on version) ... pick that and click extend to add /lib/app/jarname.jar to the path.

You don't have to change the runtime classpath cuz it's automatically picked up.

For WAS 5.x and 6.x, you have to add a shared library on the server.  The /lib/app is no longer supported there.  Go to AdminConsole, expand "Environment" node, then click on "shared libraries".  Point to a path for your jars.  Actually it can be any path, but since it's a shared library it can be pointed to from any of your apps AND you can change the location of the jars just by changing the ONE shared library entry.  In WTE (in WSAD), the easiest way to do the same thing is open your server config, check "enable admin console" on the second tab, save and restart your server, then right click on your server node and choose "run admin console".  This will give you the exact same console as used for the full WAS.  Do everything the same way.

Finally, for 5.x and 6.x, in you WSAD project follow the same instructions as for WSAD 4 above.

HTH!

Avatar of rahulkotharirahulkothari

ASKER

but then the whole point of putting the shared libraries in CVS goes away ...?

I mean this sounds so much more hectic ...

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

The best option would be to create a project to store all of the utility jars and then associate the other projects to it so it is a common repository for the utilitys.
Java App Servers

Java App Servers

--

Questions

--

Followers

Top Experts

Java application servers that support the Java EE platform and features include JOnAS from Object Web, WildFly (formerly JBoss AS) from JBoss, Geronimo from Apache, TomEE from Apache, Resin Java Application Server from Caucho Technology, Blazix from Desiderata Software, Enhydra Server from Enhydra.org, and GlassFish from Oracle. Commercial Java app servers include WebLogic by Oracle, WebSphere from IBM and the open source JBoss Enterprise Application Platform (JBoss EAP) by Red Hat.