WLS9.2 caching results of CallableStatement?

Hello All,
I've been flummoxed by a problem in which the results of a CallableStatement seem to be cached by our WebLogic 9.2 server. We have a connection pooled DataSource talking to Oracle8i (8.1.7.4.0), configured with 10 statements in a cache and the LRU algorithm, also 1 connection initially and a maximum of 15. We're using Oracle's ojdbc14.jar implementation and orai18n.jar.
We're mostly executing CallableStatments for packaged procedures/functions that in turn call other procedures or run selects. What I'm geting at is, we're retrieving data rather than updating through our CallableStatement. The retreieved data we extract from the returned oracle ARRAY type using a homegrown map to the "shape" of each Struct underlying the ARRAY collection. In this problem, two CallableStatements are run and return data to our Java app, and at the start all is well. Then the underlying data is changed - via procedures in an oracle forms app on the database, not our Java app. Our Java app should display the changed data. The first CallableStatement runs again and an Eclipse remote debug shows the updated data, however the second CallableStatement continues to return the older data. We have oracle test harnesses that call the same procedures as our CallableStatements; both return the new data. If we leave it for sometime less than 45 minutes, the new data is then returned by both statements. Similarly, if we set the statement cache size to 0, the newe data is returned both times. We're closing the DB resources, (and in the right order: ResultSet, Statement and Connection)
Has anyone come across this issue before? (From my searches it appears not). Secondly, is there a way of debugging into the WLS DataSource mechanism? I can go down as far as getting the ARRAY and no further, but if there's a switch/command line arg that I could use in the startWeblogic script that'd be great. I remember reading about a WebLogic attributeSpy, (or maybe spyAttribute?) and if I had to try the WLS driver for that I'd give it a go, but if Oracle have something similar that'd be fantastic.
FWIW, changing the data via the oracle forms app changes the sysdate on the oracle database too.
Variables from the debug that might be relevant:
DataSource retrieved from jndi context of type WLEventContextImpl
driversettings
weblogic.jdbc.rmi.internal.RmiDriverSettings{verbose=false chunkSize=256 rowCacheSize=0}
driverProps entrySet [EmulateTwoPhaseCommit=false, connectionPoolID=xxxxx, jdbcTxDataSource=true, LoggingLastResource=false, dataSourceName=xxxxx]
Connection is PoolConnection_oracle_jdbc_driver_T4CConnection
weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@5f1
statement     is CallableStatement_oracle_jdbc_driver_T4CCallableStatement (id=nnnnn)     
weblogic.jdbc.wrapper.CallableStatement_oracle_jdbc_driver_T4CCallableStatement@5f2
There is a StatementHolder too:
weblogic.jdbc.wrapper.CallableStatement_oracle_jdbc_driver_T4CCallableStatement@5f2=weblogic.jdbc.common.internal.StatementHolder@21cae26
In the "stmts" table in "conn" in "stmt", there are the following two variables:
jstmt     T4CCallableStatement (id=nnnnn) oracle.jdbc.driver.T4CCallableStatement@21cad44
key     StatementCacheKey (id=nnnn)     { call my_pack_name.my_proc_name(?,?)}:true:-1:-1
Thanks for any help that anyone might be able to shed on this!
Best Regards,
ConorD

Hi Joe,
Thanks for your reply; I'm delighted to see that you're still here helping WLS users under the Oracle banner :-)
To answer your question, yes, we do get good behaviour when we set the statement cache size to 0. I ran a test on that where I set the Statement cache size to 0 and the initial number of connections to 0, then:
*1)* Logged in through our Java/WLS app to a few test scenarios and saw the data
*2)* Ran the oracle app on that DB outside of WLS which moved forward the state of the app, including sysdate
*3)* Logged in again through our Java/WLS app to the test scenarios and saw the new data being returned from both CallableStatements
I don't think that the initial number of connections had any effect on this, since WLS was running all the time and there was no retargetting of the DataSource, so IMHO it must have been the statement cache size.
Where we hadn't got the Statement cache size 0, for step *3)* above one of the two CallableStatements continued to return the old data, (as if it had been told by the DB that the result hadn't changed, and it might as well return a cached result - if WLS does cache ResultSets?)
Lastly, there is one case where we do see good behaviour even with a Statement cache size of 10:
Between steps *2)* and *3)* above, if I untarget & activate, then retarget & activate the DataSource (to the same server/db that had just been untargetted) we see new data back from both statements on running step *3)*, even with the Statement cache size set to 10. My guess is that the untarget frees up any object in the Statement cache for collection and removes the remote DB session stubs that may be caching on the DB side.
Thanks again and Best Regards,
ConorD

Similar Messages

  • Ibots are not retrieving cached results.

    Hello,
    I have scheduled the ibots on reports available on a dashboard page and added a list of users in the recipients tab. i want the results to be cached for these list of users.
    I get an email with the results of the dashboard report whenever the ibots finish to run. Then i tried to login as one of the users from the list of users in the recipients, but the reports seems to run again without retriving the cached results.
    Can anyone help me to understand why the results are not being cached?
    Thanks,
    sK.

    hi SK,
    check this
    http://www.artofbi.com/index.php/2010/03/obiee-ibots-obi-caching-strategy-with-seeding-cache/
    thanks,
    Saichand.v

  • Method Iteretor Cache Results Problem

    Hi all,
    I am executing a method and taking some results via method iterator.
    Method iterator Cache Results property is true. But i want to clear or remove all data from cache after completing my job.
    I am trying set to methodIteretor.result property to null in bindings. But this bindings property is unsettable property.
    Thanks to all.
    gokmeni

    Are you attempting to set the property with the Flat editor or within the XML file itself?
    --Ric                                                                                                                                                                                                       

  • Why is my cache results not highligted anymore?

    why is my cache results not highligted anymore?

    When I do a word/s search.
    Normally the words I typed and searched on Google will be highlighted in different colors each word at the top of the webpage.
    The same color will be highligted for each word/s whenever they appears all throught out the page. when I open it as cached.
    Now the words don't highlight any more and no color even.
    Here below info from About.com about what I am asking about:
    http://google.about.com/od/searchingtheweb/qt/cache_syntax.htm
    ''''''Highlight Keywords With Google Cache Search''''''
    Find Specific Information Faster With Google's Cache
    By Marziah Karch, About.com Guide
    Is it hard to find a specific piece of information on a large Web page? You can simply this by using Google's cached page to highlight your search term.
    As Google indexes Web pages, it retains a snapshot of the page contents, known as a cached page. When a cached page is available, you'll see a Cached link at the bottom of the search result.
    Clicking on the Cached link will show you the page as it was last indexed on Google, but with your search keywords highlighted. This is extremely useful if you want to find a specific piece of information without having to scan the entire page.
    Keep in mind that this shows the last time the page was indexed, so sometimes images will not show up and the information will be out of date. For most quick searches, that doesn't matter. You can always go back to the current version of the page and double check to see if the information has changed.

  • Inconsistent results from CallableStatement

    We are getting inconsistent results from a call to an Oracle database. We have a CallableStatement that returns 4 INTEGERs.
    It runs perfectly if I run the Oracle procedure directly from the sql command line and then call it from the java code.
    However if I recompile the Oracle stored procedures and execute the Callable Statement (without first running it from sql) then I am getting incorrect results...1,2,1,1 is being returned instead of 1,2,0,3. Are these results being cached somewhere???
    We are using Oracle 8.1.7, JDK 1.3.1, and Oracle thin driver 8.1.7.
    The code is as follows:
    <pre>
    private CallableStatement autoLBNumbersNeeded;
    private void prepareStatements(){
         autoLBNumbersNeeded=dbConnection.prepareCall("{CALL
         pkg_scheduler.pr_auto_lb_nos(?,?,?,?)}");
         autoLBNumbersNeeded.clearParameters();
         autoLBNumbersNeeded.registerOutParameter(1, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(2, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(3, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(4, java.sql.Types.INTEGER);
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    </pre>
    The Oracle procedure is
    <pre>
    PROCEDURE proc1( p_parm_1 OUT NUMBER, p_parm_2 OUT NUMBER, p_parm_3
    OUT NUMBER, p_parm_4 OUT NUMBER)
    AS
    BEGIN
    -- Get Counts
    SELECT COUNT(*)
    INTO p_parm_1
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_2
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_3
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_4
    FROM blah ......
    EXCEPTION
    blah .......
    END proc1;
    </pre>
    Can anyone help?
    Many thanks
    Fionnuala

    Hi
    Yes I have a debug line that prints them out in the doAutoLoadBalancing method - this is the point where I am diagnosing the problem. It only prints the correct results after I have already run the procedure from the SQL command line.
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    if (m_cat.isDebugEnabled()) {m_cat.debug("mwFF: "+mwFF+"; mwHF: " +mwHF+"; wmFF: "+wmFF+"; wmHF: "+wmHF);}
    </pre>

  • RFC Look up Caching Results

    Hello Experts,
                I am facing an issue in PI7.1 while using RFC Look up functionality. I use this in a high usage interface and now I see that it actually caches the results somewhere and does not actually make the RFC call to the backend system.
    I refered some threads, but could not get answers. Has anyone else faced this issue ? If yes, could you let me know what the solution is to get around this issue?
    Thanks,
    Karthik

    Thanks Arpil, We are calling the RFC look up once per mapping. We get results into a global variable and process it thereafter. But this interface that has this mapping itself gets called very frequently, around 30 calls per second.
    We are using the RFC look up wizard in PI7.1 and hence not building any new java code etc..but the results are cached. If the data changes in the back end system, the RFC still fetches us old data and only a forced cache refresh is causing it to pick up the new results..

  • Selecting fewer columns from cached results

    If I'm reading the docs right, I should be able to create a request with X number of columns to populate the cache, so that a subsequent request that has a direct subset of those columns would hit the cache. That's not what I'm seeing.
    I have four fact columns in the RPD. The first three, Sales, Cost, and Units, are coming straight from the Physical Layer. The fourth, Profit, is a subtraction of Sales minus Cost.
    Here's what I'm seeing:
    1a. Log In to Answers
    1b. Create Query: Year, Sales, Cost, Profit - this populates the cache.
    1c. Log Out of Answers
    1d. Log back in to Answers
    1e. Create Query: Year, Sales, Cost - this query does NOT hit that cache entry.
    2a. Close all cursors (under Administration...Manage Sessions)
    2b. Log Out
    2c. Purge Cache
    3a. Log In to Answers
    3b. Create Query: Year, Sales, Cost, Units - this populates the cache.
    3c. Log Out of Answers
    3d. Log back in to Answers
    3e Create Query: Year, Sales Cost - this query DOES hit the cache entry.
    The only difference between the two sequences is that one references a calculated column (Profit) and the other does not.
    Incidentally, I've tested this with Profit defined first as a subtraction of the logical columns, and then again as a subtraction of the physical columns, with the same behavior observed both ways.
    Can someone please confirm this behavior and suggest a reason why it should occur?

    Turribeach, here are the Session Logs for each of the four requests. I've interspersed the steps between double-rows of = signs.
    ===================================================
    ===================================================
    STEP 1A: Log In
    STEP 1B: Create request - Year, Sales, Cost, Profit
    ===================================================
    ===================================================
    +++Analyst:320000:320001:----2009/01/15 09:13:51
    -------------------- Logical Request (before navigation):
    RqList
    Times.Year as c1 GB,
    Sales:[DAggr(~Base Facts.Sales by [ Times.Year, Times.Year End Date] )] as c2 GB,
    Cost:[DAggr(~Base Facts.Cost by [ Times.Year, Times.Year End Date] )] as c3 GB,
    Sales:[DAggr(~Base Facts.Sales by [ Times.Year, Times.Year End Date] )] - Cost:[DAggr(~Base Facts.Cost by [ Times.Year, Times.Year End Date] )] as c4 GB,
    Times.Year End Date as c5 GB
    OrderBy: c5 asc
    +++Analyst:320000:320001:----2009/01/15 09:13:51
    -------------------- Sending query to database named BIEE_TRAIN (id: <<1690>>):
    WITH
    SAWITH0 AS (select sum(round(T68.COST , 2)) as c1,
    sum(round(T68.SALES , 2)) as c2,
    T61.YEAR as c3,
    T61.YEAR_END_DATE as c4
    from
    GLOBAL_ADMIN.BI_D_TIME T61,
    GLOBAL_ADMIN.BI_F_SALES T68
    where ( T61.MONTH = T68.MONTH )
    group by T61.YEAR, T61.YEAR_END_DATE)
    select distinct SAWITH0.c3 as c1,
    SAWITH0.c2 as c2,
    SAWITH0.c1 as c3,
    SAWITH0.c2 - SAWITH0.c1 as c4,
    SAWITH0.c4 as c5
    from
    SAWITH0
    order by c5
    +++Analyst:320000:320001:----2009/01/15 09:13:52
    -------------------- Query Result Cache: [59124] The query for user 'Analyst' was inserted into the query result cache. The filename is 'C:\OracleBIData\cache\NQS_TRAINING_733424_33231_00000000.TBL'.
    ===================================================
    ===================================================
    STEP 1C: LOG OUT
    STEP 1D: LOG IN
    STEP 1E: Create request - Year, Sales, Cost
    ===================================================
    ===================================================
    +++Analyst:330000:330001:----2009/01/15 09:17:41
    -------------------- Logical Request (before navigation):
    RqList
    Times.Year as c1 GB,
    Sales:[DAggr(~Base Facts.Sales by [ Times.Year, Times.Year End Date] )] as c2 GB,
    Cost:[DAggr(~Base Facts.Cost by [ Times.Year, Times.Year End Date] )] as c3 GB,
    Times.Year End Date as c4 GB
    OrderBy: c4 asc
    +++Analyst:330000:330001:----2009/01/15 09:17:41
    -------------------- Sending query to database named BIEE_TRAIN (id: <<2062>>):
    select T61.YEAR as c1,
    sum(round(T68.SALES , 2)) as c2,
    sum(round(T68.COST , 2)) as c3,
    T61.YEAR_END_DATE as c4
    from
    GLOBAL_ADMIN.BI_D_TIME T61,
    GLOBAL_ADMIN.BI_F_SALES T68
    where ( T61.MONTH = T68.MONTH )
    group by T61.YEAR, T61.YEAR_END_DATE
    order by c4
    +++Analyst:330000:330001:----2009/01/15 09:17:41
    -------------------- Query Result Cache: [59124] The query for user 'Analyst' was inserted into the query result cache. The filename is 'C:\OracleBIData\cache\NQS_TRAINING_733424_33461_00000001.TBL'.
    *** Note: At this point, there are indeed TWO entries in the cache. ***
    ===================================================
    ===================================================
    STEP 2A: Close all cursors
    STEP 2B: Log Out
    STEP 2C: Purge the cache
    STEP 3B: Create request - Year, Sales, Cost, Units
    ===================================================
    ===================================================
    +++Analyst:350000:350001:----2009/01/15 09:23:18
    -------------------- Logical Request (before navigation):
    RqList
    Times.Year as c1 GB,
    Sales:[DAggr(~Base Facts.Sales by [ Times.Year, Times.Year End Date] )] as c2 GB,
    Cost:[DAggr(~Base Facts.Cost by [ Times.Year, Times.Year End Date] )] as c3 GB,
    Units:[DAggr(~Base Facts.Units by [ Times.Year, Times.Year End Date] )] as c4 GB,
    Times.Year End Date as c5 GB
    OrderBy: c5 asc
    +++Analyst:350000:350001:----2009/01/15 09:23:18
    -------------------- Sending query to database named BIEE_TRAIN (id: <<2399>>):
    select T61.YEAR as c1,
    sum(round(T68.SALES , 2)) as c2,
    sum(round(T68.COST , 2)) as c3,
    sum(round(T68.UNITS , 0)) as c4,
    T61.YEAR_END_DATE as c5
    from
    GLOBAL_ADMIN.BI_D_TIME T61,
    GLOBAL_ADMIN.BI_F_SALES T68
    where ( T61.MONTH = T68.MONTH )
    group by T61.YEAR, T61.YEAR_END_DATE
    order by c5
    +++Analyst:350000:350001:----2009/01/15 09:23:19
    -------------------- Query Result Cache: [59124] The query for user 'Analyst' was inserted into the query result cache. The filename is 'C:\OracleBIData\cache\NQS_TRAINING_733424_33798_00000002.TBL'.
    ===================================================
    ===================================================
    STEP 3C: LOG OUT
    STEP 3D: LOG IN
    STEP 3E: Create request - Year, Sales, Cost
    ===================================================
    ===================================================
    +++Analyst:360000:360001:----2009/01/15 09:24:36
    -------------------- Logical Request (before navigation):
    RqList
    Times.Year as c1 GB,
    Sales:[DAggr(~Base Facts.Sales by [ Times.Year, Times.Year End Date] )] as c2 GB,
    Cost:[DAggr(~Base Facts.Cost by [ Times.Year, Times.Year End Date] )] as c3 GB,
    Times.Year End Date as c4 GB
    OrderBy: c4 asc
    +++Analyst:360000:360001:----2009/01/15 09:24:36
    -------------------- Cache Hit on query:
    Matching Query:     SET VARIABLE QUERY_SRC_CD='Report';SELECT "Time Dimension"."Year" saw_0, "Base Measures".Sales saw_1, "Base Measures".Cost saw_2, "Base Measures".Units saw_3 FROM Global ORDER BY saw_0
    Created by:     Analyst
    +++Analyst:360000:360001:----2009/01/15 09:24:36
    -------------------- Query Status: Successful Completion
    +++Analyst:360000:360001:----2009/01/15 09:24:36
    *** Note: At this point, there is ONE entry in the cache. ***

  • Inconsistent result of CallableStatement

    I have seached for this problem in different forums and
    found some similar postings about this on java.sun.com. But here nothing.
    OK come to business.
    I have a PL/SQL stored procedure, that calls sequent 4 more similar procedures.
    If I use SQLPLUS or SVRMGRL to execute this procedure, it works fine.
    But if I use JDBC & CallableStatement, I get very strange result, namely
    First three internal procedures finish with correct result and fourth procedure
    produces no result. Without any visible errors.
    Has anyone similar behavior expierenced ?

    Hi
    Yes I have a debug line that prints them out in the doAutoLoadBalancing method - this is the point where I am diagnosing the problem. It only prints the correct results after I have already run the procedure from the SQL command line.
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    if (m_cat.isDebugEnabled()) {m_cat.debug("mwFF: "+mwFF+"; mwHF: " +mwHF+"; wmFF: "+wmFF+"; wmHF: "+wmHF);}
    </pre>

  • Caching Result Set ?

    folks
    I have a search page which returns a result set and the results are put in the session to be able to access when user clicks on the page numbers(pagination) in the results pane.
    Is there any way we can store or cache this and access instead of fetching it off the session.

    You can store the data as a multi dimensional array in javascript on the rendered jsp page as a javascript function. It exists on the client side (browser) and you can use an onClick event on the page's button to call up various parts of the array and display it to the user. That way, your user doesnt have to submit the page back to the servlet to pagenate to the next page. The data shows up immidiately instead. You'll have to read up on javascript to learn how to do this. (Also I assume you are storing the resultant data in some type of array and not the raw resultSet).
    However, if so much data is returned to the user he needs pagenation, I suggest you add filter textfields to allow him to limit what data is returned so pagenation is not needed. Pagenation implies there is too much data for the user to effectively use at once (no one likes scrolling down a list of 200 items). For instance, instead of displaying all names in a list, add a filter so the user can search for all last names that begain with an A, or B, etc through Z. Then, when displayed to the user, show the list sorted by your filter criteria (lastName). If there is still too much data in the list, I suggest putting up a vertical scrollbar rather than pagenation.

  • Cached results returned from LOV even though query criteria has changed

    Hi,
    JDeveloper 10.1.3.4
    JHeadstart 10.1.3.3.81
    We have a screen that is entered in create row mode. Just prior to entering the screen the user has to select a study for which the record is to be created for. On the screen we have an LOV and a few read-only fields that are populated from the LOV selection. The LOV includes a "study id" as one of its query bind parameters. The data returned by the LOV is very study specific in that a code used in one study will be the same as another however have a very different meaning. We are finding that the first time a code is used, the LOV dialog is shown, however it doesn't get shown again (just automatically populated) for any other further records created even though the user has changed study. It appears as though the code entered by the user is checked against the cache for a match and ignores the fact that the query bind parameter value has changed and should therefore either re-display the LOV dialog or retrieve the results from the correct study.
    The requery condition on the LOV seems irrelevant here (as I changed it to Always and nothing different happened). And of course there isn't a requery condition on the main view object as it is in create row mode.
    Can you point me in the direction of how to clear this cache when a new study is selected? I am unsure how to get at this cache.
    Thanks.

    Barry,
    Hard to help you as it is very specific to your app.
    Can you run in de bug mode and set a breakpoint in LovItemBean.validateWithLOV?
    This should help you find out why the LOV is not shown the second time.
    Steven Davelaar,
    JHeadstart team.

  • POWL: Refresh the cache results of POWL during page load.

    Hi Friends,
    I am using a feeder class for my POWL. Whenever the user clicks opens the POWL, he sees the cached data/results and he is expected to do a manual refresh to see current/new data. I want to eliminate this by refreshing the cache during the page load itself and show user current data. I already know about the exporting parameter in handle_action method which is used to do refresh. But it does not work in this case.
    Pls help.

    Hello Saud,
    In which release you are? in new release you can do refresh by personalization where options are there.
    There are other options also to refresh
    1) By passing URL parameter refreshA=X it will refresh all queies when loading
    2) By passing refreshq=X, it will refresh the current query
    best regards,
    Rohit

  • Ramifications of caching results of InitialContext(().lookup?

    One of the thing we discovered during our early efforts to port a 5.1 app to
    7.0 was that in 7.0 the JNDI lookups were simply taking FOREVER. It was
    really horrible.
    So, the question is, what are the ramifications of caching the results of
    this:
    Context ctx = new InitialContext();
    SessionBeanHome = (SessionBeanHome) ctx.lookup("SessionBean")
    We're guessing that this will fail horrible in a clustered environment, but
    what about a stand alone environment?
    Thanx!
    Will Hartung
    ([email protected])

    Can you provide some statistics, how much time it used to take and how much
    is it taking now etc.
    In 70, We know that the first InitialContext() call will take some time, as
    it needs to initialize kernel and generate the hot-codegened initial context
    stub. But once you have this call done, next initialContext call should be
    pretty fast.
    If you want to avoid the hot-codegen cost of stub, use this work around.
    From the browser, try
    http://server:port/bea_wls_internal/classes/weblogic/jndi/internal/RootNamin
    gNode_WLStub.class
    Save this class in your client package. This may give some performance
    benefit.
    This needs that, your classpath servlet should be turned on. See docs for
    more info on this.
    But I don't recommend this. This may become an issue later and may generate
    version incompatibilities, if you upgrade server and forgot to re-pack the
    client etc. I am not sure though.
    Hope this helps.
    Cheers,
    ..maruthi
    "Will Hartung" <[email protected]> wrote in message
    news:3d6a8d58$[email protected]..
    One of the thing we discovered during our early efforts to port a 5.1 appto
    7.0 was that in 7.0 the JNDI lookups were simply taking FOREVER. It was
    really horrible.
    So, the question is, what are the ramifications of caching the results of
    this:
    Context ctx = new InitialContext();
    SessionBeanHome = (SessionBeanHome) ctx.lookup("SessionBean")
    We're guessing that this will fail horrible in a clustered environment,but
    what about a stand alone environment?
    Thanx!
    Will Hartung
    ([email protected])

  • How does BerkeleyDB know when cached results from stat function are valid ?

    Something curious: I have a berkeley database about 2G in size and a program that (1) opens the database, not DB_RDONLY; (2) calls stat(), without DB_FAST_STAT; (3) calls sync(); (4) calls close().
    Running this program the first time takes a good amount of time in the stat() function - 20 minutes at least - and thrashes the disk all that time. So it's trawling the database to get record counts etc.
    Running the program again takes only a few seconds so clearly the database is caching those stats and knows they're up to date - makes sense.
    What's odd though is why the stats weren't known to be up to date on the first run. The database was actually copied from another box where the last thing to happen was a run of the same program. So it should have had up-to-date stats cached in it.
    It's as if the cached values are somehow invalidated by moving the database to another machine. Why would that happen ? Where are the cached stats held and how does berekelyDB decide when they're up to date ?

    I still cannot solve this problem, but I have some more observations:
    1) yes it is a JApplet, and yes, the data streaming is performed in a separate thread.
    2) Wireshark sniffing shows that data sent out by the PHP datasource on the server is sent immediately, and is not buffered (am using ob_start(), ob_flush() and flush() alls in the PHP script).
    3) On Windows Vista, using Internet Explorer or Firefox, there is a constant 30 second delay before the Applet returns from this line: InputStream is = url.openStream();
    4) After this 30 seconds, data appears in the Applet, but it can be seen also with java console debug prints that the data seems to be buffered. The newest data shown in the Applet is not the newest data sent to the client by the PHP datasource script.
    5) On a SUSE Linux client, the Applet works as it should, there is no delay time in showing the data.
    It appears as if there is on Windows a buffering of data which I do not wish to have and which does not occur on Linux. I need to find out how to get the URL openStream() call to return immediately allowing the initial data to be read and shown on the Applet. And I need to remove the buffering of data so that the data can be shown on the Applet when it arrives.
    Can anyone help? Why does this work on Linux but not on Windows, and what can I do, at best within the Java code, to get the Applet to work on Windows as it does on Linux?
    Thanks!
    Steve, Denmark

  • UUP: um:getProperty caching results?

    I've set up a UUP to access some data in an external database,
    and I'm getting some interesting effects when the external data
    changes. Am I missing something obvious here?
    When the UUP is first accessed, all of the information is
    returned correctly by the
    <um:getProperty propertyName="<myProp>"/> tag. If that data
    then changes in the external data store, the tag still returns
    the original data.
    I assumed this was due to the profile not reloading the
    information, but it does in fact as I can retrieve it using
    either the explicit getter method, or the getProperty method on
    the profile.
    Just to make it a bit clearer, if I do:
    <um:getProfile profileType="myType" profileKey="<user>" profileId="myProfile"
    scope="request"/>
    <%myProfileType mp=(myProfileType)myProfile;%>
    <um:getProperty propertyname="<property>"/>
    <%=mp.get<property>%>
    <%=mp.getProperty(null, "<property>", null, null)%>
    Then I get cached data displayed on the first line, and current
    data on the other two, until I restart the server.
    I'd assumed the <um:getProperty> tag was just calling the
    getProperty method on the bean rather than caching anything
    itself.
    Any suggestions?
    David

    Hi David,
    <um:getPropery> gets the property value from the cache, not directly from a
    ConfigurableEntity EJB. If you have first called <um:getProfile> with session
    scope, then it uses the CachedProfileBean that the <um:getProfile> tag put into
    the session. If you don't call <um:getProfile> with session scope, then it uses
    the AnonymousProfileBean.
    You could experiment with calling <um:getProfile> with session scope and check
    out the session to see the cached profile show up.
    You are calling the <um:getProfile> tag with request scope, not session scope.
    Also, I see that you are testing your application using
    ConfigurableEntity.getProperty() directly (with your mp.getProperty() call). In
    a real application you will want to use CachedProfileBean for speed. Search this
    newsgroup and check out the javadoc for hints about using the CachedProfileBean.
    Here are some links that may be useful:
    <um:getProfile> docs for WLCS 3.5 at
    http://edocs.bea.com/wlcs/docs35/p13ndev/jsptags.htm#1058056
    <um:getProperty> docs at
    http://edocs.bea.com/wlcs/docs35/p13ndev/jsptags.htm#1058056
    Anonymous profile documentation at
    http://edocs.bea.com/wlcs/docs35/p13ndev/users.htm#1092004
    CachedProfileBean javadoc
    http://edocs.bea.com/wlcs/docs35/javadoc/wlps/com/beasys/commerce/user/jsp/beans/CachedProfileBean.html
    David Marston wrote:
    I've set up a UUP to access some data in an external database,
    and I'm getting some interesting effects when the external data
    changes. Am I missing something obvious here?
    When the UUP is first accessed, all of the information is
    returned correctly by the
    <um:getProperty propertyName="<myProp>"/> tag. If that data
    then changes in the external data store, the tag still returns
    the original data.
    I assumed this was due to the profile not reloading the
    information, but it does in fact as I can retrieve it using
    either the explicit getter method, or the getProperty method on
    the profile.
    Just to make it a bit clearer, if I do:
    <um:getProfile profileType="myType" profileKey="<user>" profileId="myProfile"
    scope="request"/>
    <%myProfileType mp=(myProfileType)myProfile;%>
    <um:getProperty propertyname="<property>"/>
    <%=mp.get<property>%>
    <%=mp.getProperty(null, "<property>", null, null)%>
    Then I get cached data displayed on the first line, and current
    data on the other two, until I restart the server.
    I'd assumed the <um:getProperty> tag was just calling the
    getProperty method on the bean rather than caching anything
    itself.
    Any suggestions?
    David--
    Ture Hoefner
    BEA Systems, Inc.
    2590 Pearl St.
    Suite 110
    Boulder, CO 80302
    www.bea.com

  • With VPD I see other users results - problems with AM caching??

    I am using JDeveloper 11.1.1.0.2.
    In my application I have 3 Appllication Modules (Admin, Store and Sale) and I use VPD and setcontext in every AM.
    @Override
    protected void prepareSession(Session session) {
    super.prepareSession(session);
    setVPDcontext();
    private void setVPDcontext() {
    String userName = getUserContext().getUserId();
    String ind = "J";
    String sql =
    "begin xxx_context.set_context('" + userName +
    "', '" + ind + "'); end;";
    java.sql.CallableStatement stmt = null;
    try {
    stmt = getDBTransaction().createCallableStatement(sql, 0);
    stmt.execute();
    catch (SQLException se) {
    throw new JboException(se.getMessage());
    finally {
    if (stmt != null) {
    try {
    stmt.close();
    catch (SQLException e) {
    throw new JboException(e);
    The problem is that I see the results of previous VPD-queries.
    3 testcases:
    1. User1 has access to 3 AM (Admin, Store, Sale), if I log in I can see the correct results in the application (in Admin, Store and Sale).
    User2 has only access to 1 AM (Store), If I log in as User2 I see the results of User1 in Store (wrong).
    2. After restarting the weblogic server and logging in as User2 I see the correct results for User2!
    If I log in as User1 I see the results of User2 in Store (wrong!!) and the correct results in Admin and Sale!
    3. User1 has access to 3 AM (Admin, Store, Sale), if I login as user User1 I only use Admin and Sale (so there are no cached results for Store).
    User3 has access to Sale and Store. If I login as User3 I see the results of User1 in Sale and the correct result in Store.
    Conclusion: I see cached query results of the first user who logges in a Application Module. Only restarting the Weblogic Server makes the cache empty. The problem only occurs with queries with VPD.
    How can I resolve this problem?

    User,
    I'm on a bind variable crusade today (not the answer to your question, unfortunately). Please please please please use bind variables instead of gluing literals together like that (use PreparedStatement instead of callable statement). You can also parse the PreparedStatement once and avoid the overhead of parsing on each call to prepareSession.
    John

Maybe you are looking for

  • Missing images in pdf and swf

    When I print to FlashPaper (2.01.2283) my pdf and swf result files don't contain the logo image in the word document. Is there a workaround for this. I was able to generate a correct pdf using pdf995.com's free converter. But I would like also to pro

  • CANT HOOK UP TO PROJECTOR

    I am having trouble hooking up to my projector. I have never had a problem before. I have the vga adapter but for some reason I am still unable to connect. Ive tried rebooting, updating, waiting till the projector was on to connect and nothing has wo

  • Viruses, malware, trojans, etc.

    I have an MPB, OSX 10.5.8 and a 16.5 year old son. I was able to resolve the kernel panic problem, but only because I had access to an external drive version of an install disc with which I could fire up Disk Utility, which then made repairs. I had b

  • Why do contacts i delete reappear in messages or spot light search

    I delete and DELETED old contacts.. but they still still appear when starting a new message as i type their name.

  • Help setting up an efficient AE/Premiere workflow.

    I am working on several AE/Premiere projects on a Pavilion M6 laptop and have a few drives that I can use for media storage/cache/exporting and am wonding what will be best way to use each one, or if I even need to. My internal drive is a Sandisk SSD