Hamvil - 2006-05-29

Hi,

I'm using sql2java in a struts-based web application. At the moment the initialization of the Manager is done inside a customized controller:

Context initCtx = new InitialContext();
DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/myapp");
Manager.getInstance().setDataSource(ds);

Is this a good approach? Or there is a better solution (about performance for example)?

Thanks, bye