You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Sam Joseph <ga...@yha.att.ne.jp> on 2002/04/26 08:31:04 UTC

Using Torque with Turbine and Initialization issues

Hi There,

So foolhardy as I perhaps am, I have tried to use my application which 
is based on the new standalone torque framework with the tdk (turbine 2.1).
 
Now this might not be an emminently sensible thing to do, but the system 
is working (sort of), but a number of questions arise

1.  If I want to use the new Torque with Turbine/TDK what is the 
recommended approach
2.  Since I am now initializing the new Torque from within the old 
Turbine, is there some way to add some init-like function or class that 
will get called when the system starts up?
3.  Is there some documentation that deals specifically with developing 
new actions, screens etc.?  I mean the tdk tutorial is great, but I was 
wondering it I couldn't add other kinds of modules.  

re point2.  at the moment I only seem to be able to add actions, screens 
and tags to the tdk, none of which give me the option of an init() 
method.  Naturally I've hacked round this by creating one, and ensuring 
it only gets called once through a static flag, but it's not very pretty.

Thanks in advance.

CHEERS> SAM


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using Torque with Turbine and Initialization issues

Posted by Brian Lawler <bl...@branuity.com>.
Hi Sam-

<warning>I am only answering #1 of your 3 part question</warning

I recently went through the same exercise of converting over to using the
decoupled Torque with an existing Turbine application (I am using the head
of the jakarta-turbine-2 cvs branch, not the TDK).  I sent a similar but
not identical question to the list, but before you follow this link, be
warned that it contains only questions and no answers!

http://www.mail-archive.com/turbine-user%40jakarta.apache.org/msg07559.html

I suspect that a problem you will run into if you have not yet is the one
that I ran into regarding TurbineSecurity and ParamterParser (described in
the above link).  The bottom line for me was that in order to use the
decoupled torque simply as a code and database generation tool, I would
still have to generate code that uses the old Turbine versions of the
crossover classes that have all now been moved into torque (e.g. Criteria,
StringKey, DBConnection, etc.)  Also, rather than change TurbineSecurity
to use the new torque generated security classes, I just left it alone. 
So here are the steps that I went through to get this all to work:

1) Installed Torque standalone as usual.

2) Copied over torque templates that use the old Turbine classes, so that
   Torque would just function as a code factory rather than a runtime
   component.

3) Leave the default connection pool in TR.props (which is the one used by
   TurbineSecurity), but also create another connection pool for my  
   application classes which corresponds to the database named in my  
   project-schema.xml file used by torque to generate the classes which
   connects to the same database as the default.

#3 is kind of a hack, and there is theoretically a way to change the default connection pool, but I had a very hard time getting it all to work properly.  This seems like a lot of work just to get the de-coupled torque working in turbine, but for me it was worth it because it gets me using the newest version of torque (jakarta-turbine-torque CVS head) in a way that is completely decoupled from the turbine and from my individual project.

HTH.

-Brian



On Fri, 26 Apr 2002 15:31:04 +0900
Sam Joseph <ga...@yha.att.ne.jp> wrote:

> Hi There,
> 
> So foolhardy as I perhaps am, I have tried to use my application which 
> is based on the new standalone torque framework with the tdk (turbine 2.1).
>  
> Now this might not be an emminently sensible thing to do, but the system 
> is working (sort of), but a number of questions arise
> 
> 1.  If I want to use the new Torque with Turbine/TDK what is the 
> recommended approach
> 2.  Since I am now initializing the new Torque from within the old 
> Turbine, is there some way to add some init-like function or class that 
> will get called when the system starts up?
> 3.  Is there some documentation that deals specifically with developing 
> new actions, screens etc.?  I mean the tdk tutorial is great, but I was 
> wondering it I couldn't add other kinds of modules.  
> 
> re point2.  at the moment I only seem to be able to add actions, screens 
> and tags to the tdk, none of which give me the option of an init() 
> method.  Naturally I've hacked round this by creating one, and ensuring 
> it only gets called once through a static flag, but it's not very pretty.
> 
> Thanks in advance.
> 
> CHEERS> SAM
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 
Brian Lawler


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>