I'm trying to integrate iBatis DAO with Axis2 and have some problem.
I'll try to explain it on the sample that I found at the
axis2-1.0-docs.zip/xdocs/tools/1_0
               //iBatis DAO invocation/CodegenToolReference.html:

   /**
    *  LoginServiceSkeleton java skeleton for the axisService
    */
   public class LoginServiceSkeleton {
       public  login.types.ReturnWebLoginElementDocument webLogin
(login.types.WebLoginElementDocument param0 ){
               //iBatis DAO invocation
                UserDAOImpl usrDao = new UserDAOImpl();
                UserKey key = new UserKey();
                key.setId(new Integer(1));
                User user = userDao.selectUser(key);
       }
   }

As you see at this example I'm creating DAO object implisetly at the
ws-method - it's not a good approach because it is very expensive
operation. I want to create a UserDAOImpl instance only once and store
it under the "application" context. It'll solve some problems, because
UserDAOImpl is responsible for DB connection pool also.

So, I want something like this (scratch only):

       public  login.types.ReturnWebLoginElementDocument webLogin
(login.types.WebLoginElementDocument param0 ){
               //iBatis DAO invocation
                UserDAOImpl usrDao = cntxt.getUserDaoInstance();
               ...
       }

The main question is: how i can receive access to TomCat's application
context inside a ws-methods? I tried to search the Axis 1.4 and Axis 2
documentation but didn't find any information that can help me. So,
your comments will be very helpful.

--
Thanks,
Vaclav

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to