Developer Zone
Register  | Login  
 Mainsoft.com
Search  
 
Mainsoft for Java EE  

Installing JAR files to the shared references


Installing JAR files to the application server shared references is useful when you have files that are used by more than one application. The advantages of sharing references are:

  • Saving disk space on the application server and on your development machine, since shared references are not copied into your project's WEB-INF\lib folder, and not deployed on the application server.

  • Decreasing application server memory usage, as Java classes will be loaded only once from the shared references and will not be loaded by every Web application that uses them.

JAR files that are installed as shared references will be automatically displayed in the Shared tab of the Add Java Reference Dialog Box.

To install a JAR file to the shared references

  1. Copy the JAR file to your application server's shared folder, according to Table 12.

  2. Restart your application server.

Installing the Mainsoft for Java EE Framework to the shared references is also very useful.

To install the Mainsoft for Java EE Framework to the shared references

  1. Copy all the JAR files located in the root folder of <Mainsoft_install_dir>\java_refs\framework to your application server's shared folder, according to Table 12.

  2. This step is for Tomcat only:

    Copy all the JAR files located in <Mainsoft_install_dir>\java_refs\framework\myfaces to <Tomcat_install_dir>\common\lib.

  3. This step is for WebSphere Portal only:

    Copy all the JAR files located in <Mainsoft_install_dir>\java_refs\framework\WebSpherePortal to <WP_install_dir>\shared\app.

  4. When the Mainsoft Framework is installed to the shared reference, the JDBC drivers referenced by System.Data are not deployed with the application. Make sure that all the JDBC drivers that you are using are added to your application server. To learn how, read Adding JDBC drivers to the application server.

  5. Restart your application server.


Table 12: Application servers shared references location
Application server Location
Tomcat <Tomcat_install_dir>\common\lib
Websphere Application Server <WAS_install_dir>\appserver\lib
WebSphere Portal <WP_install_dir>\shared\app

For more information on sharing references, read:

Note

Mainsoft for Java EE does not automatically recognize JAR files in WebSphere Application Server shared libraries. JAR files are considered as shared only when added to the default locations described in Table 12.

If your application uses a JAR file that is located in a non-default shared library, you must explicitly change the CopyLocal property of the reference to False. Otherwise, this JAR file will be redeployed as part of your application, which may result in an unexpected behavior at runtime.

Related Sections

References

Learn how to add Java references to your Mainsoft for Java EE project.


Home  Site map  Privacy statement  Legal notice  Contact us
Mainsoft Product Validations: Optimized for Microsoft Visual Studio, Java Powered for the Enterprise, and Ready for IBM WebSphere.
Read more about: .NET Java and .NET for Linux

Copyright © Mainsoft Corporation 2005-2009. All rights reserved.