Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shared library in Websphere 7

I am deploying my EAR on WAS 6 having 3 modules, in all of those 3 modules there are many jar files it makes my EAR heavy, to avoid that i want to use Shared Library wizard of Websphere. Please provide me link or tell me what changes i have to make in my code or resource or any .xml files. I am using below link to configure my JARs in Websphere Websphere Shared Library link 1 Link 2 Link 3

Thanks in advance

like image 270
blackberry dev Avatar asked Jun 09 '14 10:06

blackberry dev


2 Answers

This is how shared libray is referenced.

Logon to the Websphere Application Server console.

  • Go to Environment -> Shared Libraries
    1. Create your own Shared Library. Add the classpath pointing to your JAR files.
    2. Apply and save this configuration.
    3. Now, Go to Servers -> Application Servers -> Select the server-> Java and Process Management -> ClassLoader.
    4. Click on that class loader.
    5. Click on the Shared Library References
    6. Click on Add.
    7. Add your shared library.
    8. Save and restart Websphere Servers.
like image 69
Devesh Avatar answered Oct 03 '22 06:10

Devesh


Thanks all for HELP.. Finally i found solution.

  1. First remove all .jar files from your EAR even from different modules.
  2. Save all .jar files in some location.
  3. Go to WAS admin console > Environment > Shared Library and give a suitable name and mention classpath of all the required jar files. eg C:/libs/ojdbc14.jar. Restart WAS.
  4. Then deploy your EAR on WAS but don't start it.
  5. Go to Admin console > Application lists > select your application > Shared Library Reference, there you will see all the modules of your EAR. Select Checkbox next to it and Click Reference Library.
  6. Here you will see all the Shared library you saved earlier, add them to all modules.
  7. Now start your application.
like image 40
blackberry dev Avatar answered Oct 03 '22 06:10

blackberry dev