yes,
I only want to execute it once.
For now I wrote my own service by
simply extending TurbineBaseService
and adding my codeline to the constructor.
It works fine.
Here the complete code, which is not much
but as I said works well:
package edu.clemson.supnet.util;
import com.ibm.vap.Transactions.*;
import org.apache.turbine.services.*;
/**
* Insert the type's description here.
* Creation date: (9/4/2001 6:12:30 PM)
* @author: Administrator
*/
public class TransactionPolicyService extends TurbineBaseService {
/**
* TransactionPolicyService constructor comment.
*/
public TransactionPolicyService() {
super();
System.out.println("setting Transaction policy");
//set transaction-thread binding policy
//Transaction.setBindingPolicy(new
TransactionToContextThreadBindingPolicy());
Transaction.setBindingPolicy(new
TransactionToThreadBindingPolicy());
System.out.println("... done !");
}
}
> -----Original Message-----
> From: Jason van Zyl [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 04, 2001 7:23 PM
> To: [EMAIL PROTECTED]
> Subject: Re: running code on startup
>
>
> On 9/4/01 5:37 PM, "Thomas Franz" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I'm looking for the right way of
> > executing one line of code when
> > the turbine servlet starts up or
> > the servlet context is started.
> >
> > Should I implement a service for that?
>
> What are you trying to do? You only want the task to execute once
> and that's
> it?
>
> > Thanks,
> >
> > Thomas
> >
> >
>
> --
>
> 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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]