Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to use connection cache in EJB

2 posts in General Discussion (old) Last posting was on 2000-03-16 19:53:56.0Z
Yuhong Liu Posted on 2000-03-16 19:52:13.0Z
Newsgroups: sybase.public.easerver
Reply-To: "Yuhong Liu" <yliu@si-ecc.com>
From: "Yuhong Liu" <yliu@si-ecc.com>
Subject: How to use connection cache in EJB
Date: Thu, 16 Mar 2000 14:52:13 -0500
Lines: 16
Organization: SI-ECC
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 207.18.189.46
Message-ID: <347_HQjstF4j$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26256
Article PK: 156924

Hi,

I have a EJB developed and run Weblogic which use Weblogic connection pool
to connect to MS SQL Server. I did create a connection cache to connect to
same database in Jaguar. How do I use this connection cache in my EJB
implemention?

Any body can give me an example to use Juagar connection cache in EJB?

Yuhong Liu
yliu@si-ecc.com


Dave Wolf [Sybase] Posted on 2000-03-16 19:53:56.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: How to use connection cache in EJB
Date: Thu, 16 Mar 2000 14:53:56 -0500
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: vpn-eme-052.sybase.com 130.214.8.52
Message-ID: <347_IBHg1H4j$GA.201@forums.sybase.com>
References: <347_HQjstF4j$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26255
Article PK: 156925

Try this

import com.sybase.jcm.*;

JCMCache cache = JCM.getCacheByName("MyCache");
Connection con = cache.getConnection(JCMCache.JCM_WAIT);
// do sql
cache.releaseConnection(con);

In the next release you will be able to do JNDI lookups for the caches.
That should be more portable across containers.

BTW welcome to EAS :)


Dave Wolf
Internet Applications Division

"Yuhong Liu" <yliu@si-ecc.com> wrote in message
news:HQjstF4j$GA.111@forums.sybase.com...
> Hi,
>
> I have a EJB developed and run Weblogic which use Weblogic connection pool
> to connect to MS SQL Server. I did create a connection cache to connect to
> same database in Jaguar. How do I use this connection cache in my EJB
> implemention?
>
> Any body can give me an example to use Juagar connection cache in EJB?
>
> Yuhong Liu
> yliu@si-ecc.com
>
>
>
>
>