dev@glassfish.java.net

Re: SQLAnyhwere / Connection Pool

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Sun, 14 Jan 2007 21:38:19 -0500

Hi Markus,

I usually create a jdbc-connection-pool first, then create a
jdbc-resource that references that jdbc-connection-pool. If you do it
in admin gui, it prompts you in each step.

You can look at the jdbc/__default in domain.xml, just for example,
    <jdbc-resource enabled="true" jndi-name="jdbc/__default"
object-type="user" pool-name="DerbyPool"/>
DerbyPool is also defined in domain.xml.

You can get more help info by running the 2 asadmin commands:
asadmin.bat help create-jdbc-connection-pool
asadmin.bat help create-jdbc-resource

-cheng


Markus KARG wrote:
> Sorry for the silly question, but while I have spent half a year now
> in implementing platforms, I still am a newbie with USING GlassFish...
> So today I wanted to try out my SQLAnywherePlatform inside of
> GlassFish, so I wrote a small WebApp that just tries to persist a row
> using JPA.
> I can ping the JDBC Connection Pool successfully.
> I also have created a JDBC Resource named exactly as the name of the
> persistence unit ("TRACK").
> But every time I run the test program, it tells me that there had been
> an EJBException.
> If I look into the GF log, I see that it tried to open port 1527 --
> Derby!
> So where can I tell GF to use my JDBC Resource but not the Derby
> default pool?
>
> Thanks a lot
> Markus