Menu

Using iBatis within an EJB?

harryajh
2004-11-22
2013-04-11
  • harryajh

    harryajh - 2004-11-22

    If I wanted to use Ibatis within a EJB session bean -what directory would I put the ibatis jar files in? tried lib, WEB-INF/lib  but doesn't seem to work.

     
    • akatliu

      akatliu - 2004-11-22

      You can put ibatis*.jar files anywhere, but please make sure your ejb.jar references ibatis*.jar using the Class-Path mechanism(within META-INF/MANIFEST.MF). In our project, we put ibatis*.jar in the root directories of EAR files. This add flexibilty to our development & deployment, though it does lead to mutiple copies of ibatis on the same app server.

      Regards,
      tao

       
    • harryajh

      harryajh - 2004-11-23

      thanks for that, I'm assuming it's the EJB's META-INF/MANIFEST.MF file I need to change? can you possibly show how to set the classpath in it to point to the jar files in the app's root directory?

      thanks once again!

       
      • akatliu

        akatliu - 2004-11-24

        You're right. Here is a sample of EJB's MANIFEST.MF, which is usually modified within an IDE, such as WSAD, JBuilder, and etc.

        Regards,
        tao

        === MANIFEST.MF===
        Manifest-Version: 1.0
        Class-Path: commons-logging.jar
        ibatis-common-2.jar
        ibatis-dao-2.jar
        ibatis-sqlmap-2.jar
        oscache-2-0-1.jar
        log4j-1.2.9.jar

         

Log in to post a comment.