axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <gdani...@macromedia.com>
Subject RE: Clarification about ServiceLifecycle (part2) ?
Date Thu, 09 May 2002 12:28:42 GMT

The lifecycle methods were implemented in Axis a couple of days ago, but right now we don't
pass anything in the context parameter to init() (you'll get null for now).  However, if you
want to get at the ServletContext in init(), you can do so via the MessageContext, which is
available as usual with MessageContext.getCurrentContext().

--Glen

> -----Original Message-----
> From: olivier brand [mailto:obrand@yahoo.com]
> Sent: Thursday, May 09, 2002 1:33 AM
> To: axis
> Subject: Clarification about ServiceLifecycle (part2) ?
> 
> 
> This a follow up on my previous email.
> As specified by the Jaxrpc spec, I would like to
> achieve the following using Axis, is it implemented
> yet (init(Context) and destroy)??
> 
> public class SunRegImpl implements ServiceLifecycle {
>    Connection dbConnection = null;
>    public void init(Object context) {
>       String dbUrl =
>   ((ServletContext)context).getInitParameter("dbUrl");
>       dbConnection =
> DriverManager.getConnection(dbUrl);
>       //other relevant code
>    }
>       public void destroy() {
>       //release the database connection
>    }
>    public Course[] getCourseInfo() {
>    //get course information using the database
> connection
>    }
>    public void registerCourseInfo(Employee emp,
> Course[] courseArray) {
>       //register for the course information using the
> database connection
>    }
> }
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Mother's Day is May 12th!
> http://shopping.yahoo.com
> 

Mime
View raw message