Subject Re: [Firebird-Java] JayBird & charset
Author Andrew Guts
Unfortunately it does not work on my server. Excuse me for stupid
question (3 days with JSP/Servlets:-), but which context should contain
that resource? And how to get it correctly. By the way I guess we missed
something about "FBDataSourceObjectFactory", did we?

Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/DBS1");

or

Context iCtx = new InitialContext();
Context eCtx = (Context) iCtx.lookup("java:comp/env");
DataSource ds = (DataSource) eCtx.lookup("jdbc/DBS1");

Both cause two screens of exception messages.

Thank for your patience...

Eugene Ryzhkov wrote:

>No problem, Andrew.
>
>I hope, you put firebirdsql.jar, mini-j2ee.jar and mini-concurrent.jar to
>CATALINA_HOME\common\lib.
>
>This is a fragment of my server.xml file:
>
><Resource name="jdbc/employeedb" auth="Container"
>type="javax.sql.DataSource"/>
> <ResourceParams name="jdbc/employeedb">
> <parameter>
> <name>username</name>
> <value>USERNAME</value>
> </parameter>
> <parameter>
> <name>password</name>
> <value>USERPASSWORD</value>
> </parameter>
> <parameter>
> <name>driverClassName</name>
> <value>org.firebirdsql.jdbc.FBDriver</value>
> </parameter>
> <parameter>
> <name>url</name>
> <value>jdbc:firebirdsql:localhost/3050:C:\\DB\\employee.gdb</value>
> </parameter>
> <parameter>
> <name>maxActive</name>
> <value>3</value>
> </parameter>
> <parameter>
> <name>maxIdle</name>
> <value>1</value>
> </parameter>
> <parameter>
> <name>CharSet</name>
> <value>Cp1251</value>
> </parameter>
> </ResourceParams>
> </Context>
> </Host>
> </Engine>
> </Service>
></Server>
>
>
>
>