Or go check out hivetranse.sourceforge.net
On 8/25/05, Aleksej <[EMAIL PROTECTED]> wrote:
> JNDI Lookup is quite expensive and really there is no sense to search
> data source
> for each time. It is enough to find it  once and save somewhere for
> later  reuse.
> Singleton object is good for such task. For example:
> -----
> public class DataSourceWrapper{
>     private static DataSource ds;
>     public static getDataSource(){
>        if( DataSourceWrapper.ds == null ){
>           // well, it is not created yet, so create it here
>        }
>        return DataSourceWrapper.ds; // at this point data source will be
> allready created and only once
>     }
> }
> -----
> In hivemind you could create service that wraps data source and inject
> it directly in your page... Read more
> about it in hivemind docs. ( not a simple task :) )
> 
> > I am using Tapestry 4 and 3, I have the 4 version installed in tomcat.
> > When you say that "making lookup each time", is it because the page is
> > refreshed?
> > How would I code this using hivemind?
> >
> > Regards,
> >
> > Frank
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]
> 
>

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

Reply via email to