import-bot (20212) [Avatar] Offline
#1
[Originally posted by pvsankar]

Hi,
I get this following error when I try to get database connection cache. But, I
am able to ping successfuly from the Jaguar manager. I used the sample code
from page 89. Any idea why i am getting the error ??


Thanks in advance,

Sankar


Error:
com.sybase.jaguar.util.JException: The connection cache 'EASDemo' was not found.

Section of the code:

package Sample.intro.javajdbc;
import java.sql.*;
import com.sybase.jaguar.jcm.*;



public class javajdbcImpl
{
public TabularResults.ResultSet getOpenJobsteps
(double order_id)
{

JCMCache _cache = null;

try {

String JagCache = "EASDemo";
_cache = JCM.getCacheByName(JagCache);
} catch (Exception e)

{
System.out.println(e.toString());
_cache = null;
return null;
}


import-bot (20212) [Avatar] Offline
#2
Re: Connection cache
[Originally posted by pvsankar]

Mike,
Thanks for your prompt response. yes, "enable cache-by-name access" is checked
on. I am able to use it from Powerbuilder NVO. Any other sugeestions ?

Thanks again,

Sankar
import-bot (20212) [Avatar] Offline
#3
Re: Connection cache
[Originally posted by mbarlotta]

Sankar

Is "enable cache-by-name access" checked on?
This is one of the Connection Cache properties.

Mike
import-bot (20212) [Avatar] Offline
#4
Re: Connection cache
[Originally posted by pvsankar]

Mike,
I am not sure whether my earlier message was clear. I still have problems
accessing cache by name using a java component. However, I am able to use the
cache from PB NVO component.


Thanks again,

Sankar
import-bot (20212) [Avatar] Offline
#5
Re: Connection cache (WORKS!!!!!!!!!!!!!)
[Originally posted by pvsankar]

Mike,
Initially I defined a OCI connecton cache(OCI.dll) to access the ORACLE
database. That worked using PB NVO. But it did not work (could not get it
working) using a java component. But I defined a JDBC connection cache and I
am able to use it with java component.


Thanks anyway,

Sankar
import-bot (20212) [Avatar] Offline
#6
Re: Connection cache (WORKS!!!!!!!!!!!!!)
[Originally posted by pvsankar]

Mike,
Initially I defined a OCI connecton cache(OCI.dll) to access the ORACLE
database. That worked using PB NVO. But it did not work (could not get it
working) using a java component. But I defined a JDBC connection cache and I
am able to use it with java component.


Thanks anyway,

Sankar
import-bot (20212) [Avatar] Offline
#7
Re: Connection cache (WORKS!!!!!!!!!!!!!)
[Originally posted by mbarlotta]

Java can only access a JDBC connection cache!

NOTE: if you want to have PB and Java components share transactions your PB
components must use the same cache and therefore JDBC!


Mike