On 9/15/01 7:21 PM, "Dan Bachelder" <[EMAIL PROTECTED]> wrote:
> okay... I see the service getting initialized early in my console...
>
> in my Index.java I have the following code... all 4 sout statements are null
> until I uncomment these first 3 lines...
>
> (1) //TurbineServices ts = (TurbineServices)TurbineServices.getInstance();
> (2) //TurbineServletService servlet =
> (TurbineServletService)ts.getService("ServletService");
> (3) //servlet.init(data);
So just to get this straight, using (1),(2), and (3) everything works fine?
> System.out.println("NAME: " + TurbineServlet.getServerName());
> System.out.println("PORT: " + TurbineServlet.getServerPort());
> System.out.println("SCHEME: " + TurbineServlet.getServerScheme());
> System.out.println("CONTEXT: " + TurbineServlet.getContextPath());
>
> Once this is executed (including those first 3 lines) my scheduled job runs
> with those same sout lines outputing the right stuff....
>
> also.. if i do..
>
> $ui.image("yo")
>
> in my Index.vm
>
> I see
>
> null://null:nullnull//resources/ui/skins/default/images/yo
>
> rendered...
>
> UNLESS.. I uncomment those first 3 lines again... so it seems like
> servletservice is not getting initialized when turbine starts up...
It gets initialized but the service has two init methods, and if I remember
there is a general problem with init(RunData) which is why the whole service
framework was completely overhauled in 3.0.
> maybe
> because at startup there is no rundata to use for the initialization...
The rundata object is there for use but I don't believe the init(RunData)
method is being called.
> I
> have started digging around in the source code that deals with all this, but
> there is quite a bit there, so it will be a while before I understand it
> enough to comment with any kind of authority...
I'll run a couple more tests and I think in a few minutes I can backport
what is being done in 3.0 to get the the server info. We'll gather it in the
servlet itself like we're doing in 3.0 and than the servlet service can just
delegate the calls to Turbine.java as is happening in 3.0. This can be done
relatively quickly and I know this works. I'll take a look at this tomorrow
as this is something that a lot of people have complained about.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]