When I try to connect to Tamino using Weblogic DataSource and ConnecionPool , I got an exception ClassCastException: weblogic.jdbc.pool.Connection
Could anyone help me and say, how can I connect to Tamino using TEJBConnection class ?
Maybe it’s easy but I now start to work with Tamino and Weblogic both …
Thanks for help …
Which Tamino version do you use?
Have you seen the examples in the documentation?
And additionally the chapter “Administration Cookbook: BEA Weblogic”?
Here is a the relevant part of the example:
This section describes the data access methods for the entity bean with bean managed persistence. Each method must start with connecting to the Tamino database and end with closing tamino database connection
Create a TEJBConnection object:
TEJBConnection connection = EJBConnectionFactory.getInstance().newConnection(“java:comp/env/tamino/accountDS”);
where the resource reference consists of:
java:comp/env standard in the EJB environment
tamino Tamino namespace
accountDS logical name of the data source
Acquire an Accessor object:
XMLObjectAccessor taminoAccessor = connection.newXMLObjectAccessor(
TAccessLocation.newInstance(“Account”),
TJDOMObjectModel.getInstance());
Do some work using Accessor objects.
Close the connection with connection.close().
I hope this helps. Otherwise please give me more information about your environment.
regards,
Waltraud