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
Log in to post a comment.
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