Oracle Coherence implementation for JDBC result set

Instead of ORM, is Oracle coherence will support for accessing the data using normal JDBC calls?
If it supports JDBC , what is the CacheStore implemetation for this?
Can you provide me some example how to cache the JDBC ResultSet values and retrieve back from Cache?

Hi,
I think you mix up several concepts.
user13266701 wrote:
Instead of ORM, is Oracle coherence will support for accessing the data using normal JDBC calls?At the moment (up to 3.5.x), there is no way to query Coherence via JDBC out-of-the-box. There were a couple of initiatives to provide such features but they were not part of the product, only initiatives in the Incubator, but I believe they have been dropped.
Upcoming releases may bring replacement, although I don't think it would be outright JDBC compatible, as that would imply converting an object-oriented data to result set so that you can convert it back, so it would in effect waste CPU resources.
If it supports JDBC , what is the CacheStore implemetation for this?
CacheStores have nothing to do with how you access the cache itself. Those are internal operations invoked by Coherence itself. Don't look for a relationship between querying the cache and doing anything with the cache store. The only relationship with them is that key-based operations on the cache may lead to operations on the cache store, but whether they do happen or not depends on the cache content, too.
Can you provide me some example how to cache the JDBC ResultSet values and retrieve back from Cache?If I understand, that is yet a third concept. If you indeed want to cache JDBC ResultSet-s obtained from the database, then I have to disappoint you: it is not directly possible, as the ResultSet object is an abstraction over an open database cursor, and hence it keeps a database resource. Active resources cannot be cached in Coherence. You may acquire a RowSet from the JDBC driver, which would be possible to cache, however it may not be the most efficient thing to do due to possibly not optimal serialization format used by the RowSet to serialize itself.
So if I did not answer the questions you wanted to ask, would you please explain in more detail what exactly you would like to do?
Best regards,
Robert

Similar Messages

  • JDBC Result Set from Non-Database Source

    In Java, is it possible to create a result set from a non-database data source?, for example an XML file, text file, vectors, java beans
    We have a Swing application that currently makes direct JDBC calls to the DB2 database for creating result sets. We want to replace JDBC calls with calls to web service, but want to still create result sets on the client, so the replacement of the datasource from database to web service call is transparent to the rest of the code.

    In Java, is it possible to create a result set from a
    non-database data source?, Yes.
    for example an XML file,
    text file, vectors, java beans
    We have a Swing application that currently makes
    direct JDBC calls to the DB2 database for creating
    result sets. We want to replace JDBC calls with calls
    to web service, but want to still create result sets
    on the client, so the replacement of the datasource
    from database to web service call is transparent to
    the rest of the code.You might want to think carefully about what you are doing.
    It is fairly easy, although somewhat tedious (many methods,) to create a new type of ResultSet.
    But if the above application is doing SQL via statements and expecting the result via a ResultSet then you are not just creating a ResultSet but an entire driver and one that will have to deal with SQL as well. And if you have to handle the SQL itself that means you will probably need a parser and interpreter.

  • RDBMS Event Generator Issue - JDBC Result Set Already Closed

    All -
    I am having a problem with an RDBMS event generator that has been exposed by our Load Testing. It seems that after the database is under load I get the following exception trace:
    <Aug 7, 2007 4:33:06 PM EDT> <Info> <EJB> <BEA-010213> <Message-Driven EJB: PollerMDB_SessionRqt_1186515408009's transaction was rolledback. The transact ion details are: Xid=BEA1-7F8C65474500D80A5B94(218826722),Status=Rolled back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],numRepli esOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=60,XAServerResourceInfo[JMS_Affinity_cgJMSStore_auto_1]=(ServerResourceInfo[JMS_Affi    nity_cgJMSStore_auto_1]=(state=rolledback,assigned=wli_int_1),xar=JMS_Affinity_cgJMSStore_auto_1,re-Registered = false),XAServerResourceInfo[ACS.Telcordi    a.XA.Pool]=(ServerResourceInfo[ACS.Telcordia.XA.Pool]=(state=rolledback,assigned=wli_int_1),xar=ACS.Telcordia.XA.Pool,re-Registered = false),XAServerReso urceInfo[JMS_Affinity_cgJMSStore_auto_2]=(ServerResourceInfo[JMS_Affinity_cgJMSStore_auto_2]=(state=rolledback,assigned=wli_int_2),xar=null,re-Registered = false),SCInfo[wli_int_domain+wli_int_2]=(state=rolledback),SCInfo[wli_int_domain+wli_int_1]=(state=rolledback),properties=({START_AND_END_THREAD_EQUAL    =false}),local properties=({weblogic.jdbc.jta.ACS.Telcordia.XA.Pool=weblogic.jdbc.wrapper.TxInfo@d0b2687}),OwnerTransactionManager=ServerTM[ServerCoordin    atorDescriptor=(CoordinatorURL=wli_int_1+128.241.233.85:8101+wli_int_domain+t3+, XAResources={weblogic.jdbc.wrapper.JTSXAResourceImpl, Affinity_cgPool, J    MS_Affinity_cgJMSStore_auto_1, ACSDispatcherCP_XA, ACS.Dispatcher.RDBMS.Pool, ACS.Telcordia.XA.Pool},NonXAResources={})],CoordinatorURL=wli_int_1+128.241 .233.85:8101+wli_int_domain+t3+).>
    <Aug 7, 2007 4:33:06 PM EDT> <Warning> <EJB> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception was:
    javax.ejb.EJBException: Error occurred while processing message received by this MDB. This MDB instance will be discarded after cleanup; nested exceptio n is: java.lang.Exception: Error occurred while preparing messages for Publication or while Publishing messages.
    javax.ejb.EJBException: Error occurred while processing message received by this MDB. This MDB instance will be discarded after cleanup; nested exception is: java.lang.Exception: Error occurred while preparing messages for Publication or while Publishing messages
    java.lang.Exception: Error occurred while preparing messages for Publication or while Publishing messages
    at com.bea.wli.mbconnector.rdbms.intrusive.RDBMSIntrusiveQryMDB.fetchUsingResultSet(RDBMSIntrusiveQryMDB.java:561)
    at com.bea.wli.mbconnector.rdbms.intrusive.RDBMSIntrusiveQryMDB.onMessage(RDBMSIntrusiveQryMDB.java:310)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:400)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:333)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:298)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2698)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2523)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by: java.sql.SQLException: Result set already closed
    at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:105)
    at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:67)
    at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next()Z(Unknown Source)
    at com.bea.wli.mbconnector.rdbms.intrusive.RDBMSIntrusiveQryMDB.handleResultSet(RDBMSIntrusiveQryMDB.java:611)
    at com.bea.wli.mbconnector.rdbms.intrusive.RDBMSIntrusiveQryMDB.fetchUsingResultSet(RDBMSIntrusiveQryMDB.java:514)
    ... 8 more
    javax.ejb.EJBException: Error occurred while processing message received by this MDB. This MDB instance will be discarded after cleanup; nested exception is: java.lang.Exception: Error occurred while preparing messages for Publication or while Publishing messages
    at com.bea.wli.mbconnector.rdbms.intrusive.RDBMSIntrusiveQryMDB.onMessage(RDBMSIntrusiveQryMDB.java:346)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:400)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:333)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:298)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2698)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2523)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    >
    I have tried several things and had my team do research but we have not been able to find an answer to the problem.
    If anyone can offer any insight as to why we might be getting this error it would be greatly appreciated. Thanks!

    i also have same error during load testing, mainly this error
    "Unexpected exception while enlisting XAConnection java.sql.SQLException"
    i tried rerunning after increasing connection pool sizes, transaction timeout, but no luck, marginal improvement in performance though
    also tried changing the default tracking levl to none, but no luck.
    i am with 8.1SP5, how about you ?
    do share if you are able to bypass these errors
    cheers

  • Can I retrieve a result set from Oracle and then incorporate that result set into my main SQL Server Stored Procedure?

    So I have a chunk of data that only resides in Oracle. So I need to capture that information from Oracle. Now before you get over zealous, I did try with an OPENQUERY and it took FOREVER! And I don't know why the OPENQUERY took FOREVER but if I run the same
    query directly against Oracle it runs very quickly...like 20 seconds.
    So now I'm wondering...can I build a dataset in my SSRS Report that uses an Oracle Data source and an Oracle Stored Procedure in its Dataset that I'll create to aggregate this subset of data and then utilize its result set back in my main reporting
    Dataset that will utilize SQL Server? And how can I do that? Can I make my main Dataset reference, say, a #TemporaryTable that is created from my Oracle Dataset in its
    I'll continue to Google a few things as I await your review and hopefully a reply.
    Thanks in advance for your help.

    Hi ITBobbyP,
    According to your description you want to use data from a Oracle data source into a DataSet which retrieving data from SQL Server. Right?
    In Reporting Services, we can have multiple data sources in one project pointing to different database. And we can use separated dataset to retrieve data from different data source. However, it's not supported to combine the two datasets together
    directly. We can only use Lookup(), LookupSet() function to combine fields from different dataset into one tablix when there are common columns between two datasets. This is the only way to make tow result sets together in SSRS.
    Reference:
    Lookup Function (Report Builder and SSRS)
    LookupSet Function (Report Builder and SSRS)
    Best Regards, 
    Simon Hou
    TechNet Community Support

  • Test for null result set

    I am trying to do a test for a null result set. Basically if the result set returns a value I want to display a table, otherwise I want to display an error message. The following code does not produce the error message. Either the test for null is incorrect, or for some reason I am not getting a null result set even when I don't enter any text into the following text boxes (this is for a login screen, these text boxes come a login screen):
    <input type="text" name="username">
    <input type="text" name="password">
    This is the code for the action page:
    <HTML>
    <%@page import="java.sql.*"%>
    <%
    //define connection
    Connection con = null;
    String user1 = request.getParameter("username");
    String pass1 = request.getParameter("password");
    String test = "good";
    try{
    //get the class
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    //get the connection
    con = DriverManager.getConnection("jdbc:odbc:errorlog", "admin", "");
    //catch your exceptions!
    catch(Exception e){
         out.println(e.getMessage());
    %>
    <title>Error Application - Logged Errors</title>
    <link href="style/errorstyle.css" rel="stylesheet" type="text/css">
    <BODY>
    <%
    //define resultset and statement
    ResultSet rs=null;
    Statement stmt=null;
    try {
    //Using the current database connection create a statement
    stmt=con.createStatement();
    %>
    <%
    String sql="SELECT* FROM tblUsers" + " WHERE Username = '"+user1+"' AND Password ='"+pass1+"'";
    rs = stmt.executeQuery(sql);
    %>
    <% //Fetch all the records and print in table
    while(rs.next()){
    String user2 = rs.getString("FirstName");
    String pass2 = rs.getString("LastName");
    %>
    <table width="100%" border="0" cellspacing="1" cellpadding="6">
    <tr >
    <td width="67" height="27" bgcolor="#999999"><strong><font size="- 1">First Name</font></strong>
    </td>
    <td width="89" bgcolor="#999999"><strong><font size="-1">Last
    Name</font></strong>
    </td>
    </tr>
    <tr>
    <td>
    <%out.println(user2);%>
    </td>
    <td><%out.println(pass2);%></td>
    </table>
    <%}
    if (rs == null)
    out.println("Incorrect Username or Password");
    //close all your open resultsets, statements, and connection when you are done with them!
    rs.close();
    stmt.close();
    con.close();
    //catch all your exceptions
    catch (SQLException e) {
         out.println(e.getMessage());
    %>

    You simply test the rs.next().
    if ( rs.next() )
    //spit out the rs row and
    //continue processing the resultset 'til empty
    else
    msg = "invalid username or password
    }

  • Custome Event for the Result Set iView

    Hi,
    does anybody know how to set up the Custom Event on the Result Set iView in order to trigger an event when a record is selected?
    I know how to do it using an event Type = EPCF + Event Name + Namespace, but this creates an extra colum on the Result Set iView with the Custom Event name on it, that has to be click in order to trigger the event. I do not want click on this column, i just want to create the event when the record is selected.
    Regards
    Diego.

    Hi Diego,
    We are also implementing similar scenario.
    We also want to open a window on the clik of any column of the result and if the result is zero we want to trigger some another iView.
    So if u have found any solution can u just let me know.
    OR else can u  just elaborate on ur current scenario using EPCF and custom event.
    Thanks in Advance.
    Regards Shruti.

  • Jdbc Result Set

    I would like to find out how to break a large result set (say 1000 records) into smaller blocks (say 50)!! Just like some of the web sites where you can view the first 50 results, then press a button to see the next 50...
    Any input will be appreciated!!
    Thanks.

    There are many ways to do this. You could write your query to return a subset of the results, say 25-50, 75-100, etc. You could write a SQL procedure that does this for you. You could get all the rows of the result set and store them in the session, or memory, as a Vector and only display the ones you're interested in.

  • JDBC result set from an Oracle PL/SQL stored procedure

    Could you please let us know the difference between oracleClose() and oracleCloseQuery() in sqlj.runtime.ExecutionContext.OracleContext. Since we upgraded jdbc driver jar to ojdbc5.jar with the oracleClose() we get the below exception and not with oracleCloseQuery(). Is it safe to use oracleCloseQuery(). The database is Oracle 11g and WAS 6.1.X.X
    java.sql.SQLException: Closed Statement: next
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:197)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:269)
    at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:205)
    at com.westgroup.pubsvc.rms.models.ResultSetSRC.getNextResult(ResultSetSRC.java:112)

    http://forums.oracle.com/forums/ann.jspa?annID=599

  • Oracle RAC implementation for SJSWS

    Hi,
    we have a requirement to set up Sun Java system webserver with Oracle RAC.
    Please let me know the implemetation details, like how to setup multiconnections/datasource in Webserver console.
    any details with respect to this are appreciated.
    Thanks in advance.

    good point. we don't have a write up yet. but it should be pretty straight forward.
    pl. refer to our documentation on how to add jdbc resource within web server 7.
    http://docs.sun.com/app/docs/doc/821-0793/gczly?l=en&a=view
    from what i understand, you will need to use the jdbc driver and JNDI resource for the Oracle RAC

  • JDBC Result Set Control

    In Oracle JDBC, when I retrieve data from Oracle server, I would like fetch page by page instead of all the data returned, and allow user scroll up and down.
    How can I do this in Oracle JDBC?
    Thanks,
    null

    But compiling it otherwise fails?
    Yes..it is progress..your event handling is using deprecated methods..if you compile with the deprecation flag, it will tell you where you used them, and compile... at least that way.
    Also..look into java.awt.event.* (Listeners and such)..
    The basic way they work is this:
    1- Implement a Listener interface (ActionListener, XYZListener, MouseListener, whatever).
    2- Implement the methods from that interface (for ActionListener and buttons it is public void actionPerformed(ActionEvent ae))
    3- Add your listener to the GUI element (( element.addActionListener(this); ))
    There is documentation as well.
    ~David

  • How to modify oracle stored procedure for JDBC Receiver Adapter?

    Hi all.
    This is Urgent.
    Scenario is
      SELECT a TABLE with procedure and update column with it,
      then send data to SAP System with RFC Adapter.
    When I executed a sync bpm, scenario was finished internal error.
    Pls, let me know how to correct procedure using JDBC Receiver Adapter?
    Regrds all.
    Procedure Code -
    SET SERVEROUTPUT ON
    CREATE OR REPLACE PROCEDURE zwtn2
    IS
       v_seller_company      wtnivhd.seller_company%TYPE;
       v_invoice_no      wtnivhd.invoice_no%TYPE;
       v_report_date     wtnivhd.report_date%TYPE;
       v_customs_date     wtnivhd.customs_date%TYPE;
       v_ap_post_date     wtnivhd.ap_post_date%TYPE;
       v_gr_date          wtnivhd.gr_date%TYPE;
    CURSOR l_cursor IS
       SELECT seller_company,
              invoice_no,
              report_date,
              customs_date,
              ap_post_date,
              gr_date
         FROM wtnivhd
        WHERE wtn_send_flag = 'N'
          AND rownum < 31
    FOR UPDATE;
    BEGIN
       OPEN l_cursor;
       LOOP
         FETCH l_cursor
          INTO v_seller_company,
               v_invoice_no,
               v_report_date,
               v_customs_date,
               v_ap_post_date,
               v_gr_date;
         EXIT WHEN l_cursor%NOTFOUND;
         UPDATE wtnivhd
            SET wtn_send_flag = 'Y' 
           WHERE CURRENT OF l_cursor;
       END LOOP;
    CLOSE l_cursor;
    END zwtn2;

    Hi Alex,
    plz have a look to Runtime Workbench / Adapter Monitoring to find an error message.
    Regards,
    Udo

  • Oracle 11i v1 for JDBC driver

    Hello:
    I checked the drivers on my XP. There is a driver called: Oracle in OraHome92. Is it ODBC? We are using 11i v1. Is it that we do not need to install JDBC client driver?
    Thanks,
    S

    A lot more useful information is required here to be able to advise you.
    Start with the assumption that you have a client, a middle tier and a data server ... three separate machines. If this is correct tell us about all of them. If it is not then explain your architecture.
    If by 11i you are referring to e-Business Suite then you should ask your question in the appropriate Apps forum as the correct answers for Apps are not necessarily the generic answers you will get here.

  • How can i display units only for the result set

    hi
    i do not want to display units (example: $ or %) for my key figure columns but i want to display units to the result.
    how can i do that

    Hi Surya,
    I don't think it is possible to have both non-unit and unit in the same kf.
    One potential workaround to do this is to create a calculated key figure/ formula that use the NODIM function for single values. Example: NODIM(0AMOUNT). Then, create a calculated key figure/formula that computes overall result on the same kf and supresses individual values but does not use NODIM....perhaps this can help you work out a solution.
    Hope this helps.
    Regards,
    Petter
    Message was edited by: M Petter

  • How to avoid duplicates for an result set

    how to avoid the duplicate rows for the below query
    SELECT  to_char(grecode (titleid)) gre_code, to_char(toeflcode (titleid)) toefl_code,titleid
              FROM (SELECT DISTINCT TO_CHAR
                                       (UPPER (TRIM (get_clob_value (table_name,
                                                                     KEY
                                       ) RESULT,
                                    titleid
                               FROM mcp_specifications a JOIN mcp_title_specifications b
                                    ON a.specificationid = b.specificationid
                                    JOIN mcp_titles c ON b.titleid = c.titleid
                              WHERE b.is_parent = 'F'
                                AND UPPER (TRIM (c.university_state)) =
                                                              UPPER (TRIM ('USA'))
                                AND TO_CHAR (get_clob_value (table_name, KEY)) IS NOT NULL
                                AND UPPER (TRIM (SPECIFICATION)) IN
                                                       (UPPER (TRIM ('program'))))
             WHERE UPPER (TRIM (RESULT)) = UPPER (TRIM ('COMPUTER SCIENCE'))
          ORDER BY RESULT ASC;the output of the query would be
    gre_code    toefl_code   titleid
    402             78             5518
    402             78             5519
    402             78             5520
    402             78             5521the output should be
    402 78 any titleid

    Some simplified code:
    SELECT grecode(titleid) gre_code,
           toeflcode(titleid) toefl_code,
           min(titleid) titleid
    FROM   (SELECT DISTINCT TO_CHAR(UPPER(TRIM(get_clob_value(table_name,KEY)))) RESULT,
                   titleid
            FROM   mcp_specifications a
                   JOIN mcp_title_specifications b
                        ON a.specificationid = b.specificationid
                   JOIN mcp_titles c
                        ON b.titleid = c.titleid
            WHERE  b.is_parent = 'F'
            AND    UPPER(TRIM(c.university_state)) = 'USA'
            AND    TO_CHAR (get_clob_value (table_name, KEY)) IS NOT NULL
            AND    UPPER(TRIM(SPECIFICATION)) = 'PROGRAM')
    WHERE  UPPER(TRIM(RESULT)) = 'COMPUTER SCIENCE'
    GROUP BY grecode(titleid),
             toeflcode(titleid)Please note that applying functions like UPPER and TRIM on a string literal can and should be avoided.
    For example:
    UPPER(TRIM('USA')) = 'USA'Why force the database to do both an UPPER and a TRIM on something that can just be represented in uppercase with no surrounding spaces? It's a waste of time.

  • Line grph for below result set

    Hi all,
    I need to get line graph for the below
    with dates as Y axis and Tack Name in X Axis.
    Please help me on this .
    Regards, Subathra

    Hi Subathra,
    If I understand correctly, it seems that you want to create a Range chart to display range bar for each task. If in this scenario, I suggest we can refer to the following similar thread:
    http://social.technet.microsoft.com/Forums/en-US/be1d7ff3-7981-4384-ab91-068323fe42b9/range-chart-to-display-timeline-start-and-end-dates-side-by-side
    If there are any misunderstanding, please provide us more information about the report. If possible, provide us some screenshots about the desired chart. So that we can make further analysis and help you out.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Premiere Pro CC - Program Monitor shows only black screen

    Hi All, I am hoping someone out there can help me (and I am sure many others) with this problem. I was using Premiere Pro CS6 and was half way through a project when I upgraded to Premiere Pro CC. This was fine and I finished the project, however soo

  • WLST : We face this issue on WLS 8.1, 9.2, 10.3

    Hi All, Unless I have a copy of the boot.properties file in the domain root directory I cannot get weblogic.WLST to "utilize" the boot.properties. I thought there was a java option I should be able to set to "point" WLST to the boot.properties in the

  • Adobe Flash 9 Active X

    I really need Adobe Flash 9 Active X, but when I try to install it, error message shows up. I uninstalled newest adobe flash 11, but stil no results. Help me please, what should I do?

  • How do i import my itunes backup discs to my macbook?

    So I have about 20 back up discs for my itunes account from my pc.  I tried to import them to my new macbook but I can't figure out how.  Nothing pops up with an import button.

  • Variable Dispenser

    I am trying to understand the use of Variable Dispenser, why do we need them, is it for locking the variable so that it do not changes its value during execution? below is one of the example I find in most of my package scripts //method to read a pac