V8 Application Level Caching (Singleton Object_?

I have a requirement to have our data base lookups cached in an object which is
shared for all sessions accessing the application. Normally this would be accomplished
via a singleton object. Howerver in the spirit of bea v8, I would like to use
V8 controls to populate the caches.
I have created a control called LookupImpl and a database control called LookupDB.
LookupDB is a member variable of LookupImpl. LookupImpl has an init() method
which will retrieves data from LookupDB and caches it for later use.
If I place LookupImpl on a page flow it works fine. But if I manually instantiate
LookupImpl (x = new LookupImpl())) in a java class (my singleton class intended
to share one copy of the information among all users) , when LookupImpl tries
to run a method on its LookupDB member variable, the member variable is null and
the process blows up.
I have also read in an article
http://dev2dev.bea.com/products/wlworkshop81/articles/wlw_internals.jsp
stating that controls cannot be manually instantiated.
So my questions are:
What would be the best practice for doing sharing application level cached data?
It is true that a java class cannot instantiate controls?
Can a control be defined to be a “singleton”?
Thanks for all input
gr

I have a requirement to have our data base lookups cached in an object
which is shared for all sessions accessing the application. Normally this
would be accomplished via a singleton object. Howerver in the spirit of
bea v8, I would like to use V8 controls to populate the caches.That's an odd approach. Normally you'd have a singleton, hang a cache object
in the JNDI tree, or even have an EJB that handled this task.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"gerry rodman" <[email protected]> wrote in message
news:3fcfb309$[email protected]..
>

Similar Messages

  • ADF - Jdev 11 - application level caching

    Hi All,
    Our system user SOA calls to populate UI's.
    So in order to make performance faster, i am planning to store LOV'S values in application scope.
    So i am looking at a solution where i can populate the lists in managed bean which is stored in application scope, when application loads.
    How i can achieve this solution, can i have servlet listener. Can i get access to bean when application loads.
    Regards
    Praveen

    Hi Frank,
    I am planning to have context listener, where i can store my attributes at application level.
    Instead of making frequent SOA calls for populating LOV'S, i can just get the attribute and set it.
    Regards
    Praveen

  • Paging from DB level or Application level .

    Hi All,
    Just wonder if anyone if you guys can give me some ideas no implementation of paging. How would normally paging be done? To be more exact, my question is referring that the paging should be done :
    1. SQL Level
    Here the retrieval of records are queried into block of record. ie: within
    range of 1-10, 11-20. There will be likely multiple hit to DB.
    2. Application level(jsp)
    Here the retrieval of records are queried from one SQL stmt. ie:
    select * from table where name = '';
    Then if it returns more 10 rows, paging is done at application level.
    The first option will reduce the network usage in terms of bandwidth.
    Kindly advice asap.
    And appreciate if u can give me any good links for reading
    Thanks.

    It also depends on whether the data retrieved must be consistent. For example, I issue a search for records. The search completes and I receive the first page of results. I navigate to the second page. A user subsequently adds a new record that would have displayed on the first page.
    So what should happen if I hit 'back'?
    Option 1 is that I use database pagination methods. In this case, I will see the new record when I hit 'back'.
    Option 2 is that I cache the results in memory (if the result set is small) or to the filesystem (if the result set is large). In this case, I will see the same page as before.Neither implementation is 'right'. It depends on the behavior that is required. Reports, for example, probably should not use method 1. However, searches probably do not need the snapshot produced by method 2.
    If you do want to save the snapshot, be sure to consider serializing it to the filesystem. I normally create one file per page and populate the data there directly. The files are named [session_id]-[page number]. However, you have a considerable amount of freedom in how you approach this.
    - Saish

  • Coherence as a hibernate 2nd level cache

    Hello,
    I'm trying to use Coherence as a hibernate 2nd level cache but I'm getting the following exception when there are hundreds of concurrent DB transactions.
    java.lang.IllegalStateException: Exceeded maximum number of waiting threads (Status=1)
    at com.tangosol.net.cache.OverflowMap$Status.waitForAvailable(OverflowMap.java:4029)
    at com.tangosol.net.cache.OverflowMap.prepareStatus(OverflowMap.java:2152)
    at com.tangosol.net.cache.OverflowMap.beginKeyProcess(OverflowMap.java:1873)
    at com.tangosol.net.cache.OverflowMap.getInternal(OverflowMap.java:580)
    at com.tangosol.net.cache.OverflowMap.get(OverflowMap.java:330)
    at com.tangosol.coherence.component.util.CacheHandler.getLease(CacheHandler.CDB:3)
    at com.tangosol.coherence.component.util.CacheHandler.ensureLease(CacheHandler.CDB:4)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ReplicatedCache.updateResource(ReplicatedCache.CDB:18)
    at com.tangosol.coherence.component.util.CacheHandler.put(CacheHandler.CDB:11)
    at com.tangosol.coherence.component.util.CacheHandler.putAll(CacheHandler.CDB:8)
    at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
    at com.tangosol.coherence.hibernate.CoherenceCache.put(CoherenceCache.java:90)
    at org.hibernate.cache.impl.bridge.BaseGeneralDataRegionAdapter.put(BaseGeneralDataRegionAdapter.java:48)
    at org.hibernate.cache.UpdateTimestampsCache.preinvalidate(UpdateTimestampsCache.java:70)
    Anyone have any ideas?
    The timestamps cache has the default replicated cache scheme.
    Thanks,
    Ivelin

    Hello,
    Actually it's happening during read from a replicated cache too.
    java.lang.IllegalStateException: Exceeded maximum number of waiting threads (Status=1)
    at com.tangosol.net.cache.OverflowMap$Status.waitForAvailable(OverflowMap.java:4029)
    at com.tangosol.net.cache.OverflowMap.prepareStatus(OverflowMap.java:2152)
    at com.tangosol.net.cache.OverflowMap.beginKeyProcess(OverflowMap.java:1873)
    at com.tangosol.net.cache.OverflowMap.getInternal(OverflowMap.java:580)
    at com.tangosol.net.cache.OverflowMap.get(OverflowMap.java:330)
    at com.tangosol.coherence.component.util.CacheHandler.getLease(CacheHandler.CDB:3)
    at com.tangosol.coherence.component.util.CacheHandler.getCachedResource(CacheHandler.CDB:10)
    at com.tangosol.coherence.component.util.CacheHandler.get(CacheHandler.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.get(SafeNamedCache.CDB:1)
    at com.tangosol.coherence.hibernate.CoherenceCache.get(CoherenceCache.java:65)
    at org.hibernate.cache.impl.bridge.BaseGeneralDataRegionAdapter.get(BaseGeneralDataRegionAdapter.java:44)
    at org.hibernate.cache.StandardQueryCache.get(StandardQueryCache.java:130)
    at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2188)
    at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2151)
    at org.hibernate.loader.Loader.list(Loader.java:2121)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1597)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
    at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:328)
    There must be a configuration option to control the number of waiting threads, right?
    I guess it's not a hardcoded constant.
    The statistics of the cache we are reading from are:
    0.99 hit probability
    550 303 gets
    1469 puts
    Size: 1270This is for 5 mins period.
    This cache holds the configuration of the application, so there are almost no writes.
    Thanks,
    Ivelin

  • How to keep an application level object running with SunIDM?

    We are working on intergrate a gmail project with SunIDM. We need an application level object running with SunIDM so it will maintain a token generated from Gmail side. In anther servlet project, I had this object saved in the attribute of the ServletContext, then other session level servlet could share this attribute anytime. Is there a way to store attribute in Servlet Context and have it shared by different user session in SunIDM? I have been reading documents and searched this forum, haven't find any topics related how to maintain an application level object live. Hopefully that I can get some hint here.
    Thank you so much.

    Paul, Thank you so much for the further explaination. I don't think it will work since the token generated from gmail will expire every 24 hours.
    We are using the gdata library published from by gmail people, and I create a new UserService object and have it run in the application level. The UserService object will generate a token and renew it every 24 hours behind the scene. Here is how I implement it in my Servlet project:
    //to have a UserService object running at the application level:
    public class GmailUserService extends HttpServlet {
    public void init(ServletConfig config) throws ServletException{
    super.init();
    userService = new UserService(myApplication);
    config.getServletContext().setAttribute("gmailUserService", userService);
    //to access this UserService object from other servlet in each user session:
    UserService userService = (UserService)servletContext.getAttribute("gmailUserService");
    Gmail will trigger an error if we create a new UserService object for each user. They recommend to have all the user to share one UserService object. I am looking for similar approach in SunIDM.
    Thank you again, Paul, for trying to help.

  • Session time out when working in application level

    Hi
    We are upgraded our PROD environment from 11.5.10.2 to R12.1.3
    When end user working at application level then it is throughing the session time out error, end user is not idle state he active and working on application level
    I have checked the profile ICX:Session Timeout it is 30
    Thanks
    Shaik

    Hi;
    Please see:
    ICX:SESSION TIME OUT
    Re: Inccreasing the timeout  parameter for the Oracle R12 session
    Also see:
    How AutoConfig sets ICX: Session Timeout [ID 307149.1]
    How To Manage Timeout at Responsibility Level [ID 412224.1]
    Regard
    Helios

  • How to set a page template as an "application level default template"?

    Hi,
    For some reason, my default application level page template is not 'default' anymore. is there a way to set that? Thanks.

    See Home>Application Builder>Application 999999>Shared Components>Themes>Create / Edit
    Jeff

  • Work status at application level

    Hi Team
    Can any one explain purpose of keeping dimension members in work status settings where dimensions are not relevent for work status at application level?

    Hi Miguel,
    You are comparing work status and the validation rules. However, these 2 are completely different functionalities.
    For maintaining validations, please take a look at the below links from help.sap:
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/72/027eddf803405eb131738b655408ce/content.htm
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/d9/7e49e5b686462a9f2a2d38c98b8446/content.htm
    For work status, please refer to the below links from help.sap:
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/f8/d51b881cfa4c5992de481ccfa05db3/content.htm
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/75/712b5c7be845cbb1e76cfe78650343/content.htm
    Hope this helps.

  • Setting application level item during authentication

    We’re having an issue with an application level item that we set during our custom authentication function to store a role list for authorization. The issue is that the application level item, which should be set using htmldb_util.set_session_state(‘ITEM_NAME’, p_item_value), is not being set.
    On further investigation we realised that this issue was only affecting developers, not users of the application. This seems to be because the home page link, set in Shared Components > Edit Security Attributes, is set to “f?p=&APP_ID.:1:&SESSION.”, which means that the developers session was being passed to the application when the “Run Application” button was pressed. What then happens is that following the successful execution of the authentication function, a new session id is generated and visible on the URL and the Application Level Items are not set correctly.
    Examples:
    I’m developing an application on Apex that has the home page link set to “f?p=&APP_ID.:1:&SESSION.”, here’s the first part of my URL at the Application home page:
    http://apex.oracle.com/pls/otn/f?p=4000:1:1065658352862710::
    I hit “Run Application” and get to this URL (note the session id is the same)
    http://apex.oracle.com/pls/otn/f?p=16033:1:1065658352862710:::::
    I log in using any old username and password (the auth scheme on this demo app always returns true) and I get to this URL (note the session id is different):
    http://apex.oracle.com/pls/otn/f?p=16033:1:1403999736046638
    My application level item is not set and I start to cry. When I recover from my tearful episode I try to log in again, I hit logout and get taken to this URL:
    http://apex.oracle.com/pls/otn/f?p=16033:1
    I log in again (with the same username or different, it doesn’t matter) and low and behold, my application level item is set ok. This is the URL I can see (note another new session id):
    http://apex.oracle.com/pls/otn/f?p=16033:1:4917752800353335
    In despair, I close my browser window and go to my other application, this one has got the home page link set to “f?p=&APP_ID.:1” (no session id passed).
    I log back into Apex as a developer and go to the application home page at this URL:
    http://apex.oracle.com/pls/otn/f?p=4000:1:131988631742187::
    I hit “Run Application” and get to this URL (note the session id is missing):
    http://apex.oracle.com/pls/otn/f?p=19114:1::::::
    I log in using any old username and password (same deal as before) and I get to this URL (new session id):
    http://apex.oracle.com/pls/otn/f?p=19114:1:4320851658879093:::::
    Amazingly, this time the application level items are set first time.
    What I’d like to know (there is a purpose to this) is:
    - Why is a different session allocated to the application after login, when a “developer’s” session id is passed to the application?
    - If I remove the session id from the home page url what is the impact? I can’t think of anywhere within the application that this is used (other than between page 101 and the home page), but our thoughts are that this could mean that users end up generating more sessions on the server.
    - Is there any other way around this, perhaps using a different method of setting the application level item? The authentication procedure which sets the item reads as follows and mimics our authentication procedure (which you can assume does a little bit more than just returning true):
    function test_login 
      (p_username in varchar2 default null, 
      p_password in varchar2 default null) return boolean is 
    begin 
      htmldb_util.set_session_state('F16929_SYSDATE', to_char(sysdate, 'DAY')); 
      return true; 
    end;- Has anyone else encountered difficulties with the setting of application level items during login or has anyone come up with a more ingenious plan for passing something back from authentication that can later be used for authorisation?
    Thanks
    matt

    Scott,
    Many thanks for the response.
    We've found a way around this now, by changing the developer's usernames to the same as their NT/ Active Directory signon, which fools APEX into maintaining the session id from their builder session even though when logging into the application they get authenticated by LDAP.
    Using a post authentication process would be ok but I can't see any way of passing a variable retrieved in the authentication process under the first session to the post authentication process so that it can be set in the second session. We'd either therefore have to insert the data into a table and read it back or add an extra LDAP call to retrieve the user role/ group list during the post authentication process.
    Thanks again,
    Matt

  • Bea.jolt.ApplicationException:TPESVCFAIL-application level service failure

    Hi All,
    When I try to open PIA 3 tier I'm getting following error on webpage: "bea.jolt.ApplicationException: TPESVCFAIL - application level service failure".
    Thanks and Regards,
    Vineel.

    This is a very generic error
    See this doc for possible causes and resolutions.
    E-AS: Master Note for "'bea.jolt.ApplicationException: TPESVCFAIL" Error [ID 1201223.1]
    https://support.oracle.com/epmos/faces/DocContentDisplay?id=1201223.1

  • Tuxedo calls procedure and Application Level Service Failure

    hello ,professors all!
    My Tuxedo Service just call an procedure exists in oracle9i, i am sure that the procedure runs ok in oracle9i individually, when it was called by my tuxedo service , it is not ok by first time ,and runs out tp application level Service failure error .But strangely it is ok by second time!
    who can explan it to me and show me a way to solve the difficult problem?
    i spend a lot time wondering the answer!
    Edited by: user9086437 on 2010-9-29 下午9:57

    There are many possible reasons why a database procedure might fail the first time it is executed and succeed after that.
    You should check the Tuxedo ULOG and Oracle database logs for any messages that may point to the problem.
    If there is a LIBTUX_CAT:6205 or LIBTUX_CAT:6206 message in the userlog file then you need to add a tx_open() call to your server's tpsvrinit() or tpsvrthrinit() function.
    If there is an OPENINFO string for the group where your server is running then you are using XA transaction management and should not be connecting to the database in your application code; if there is not an OPENINFO string for the group where your server is running then you need to connect to the database in your application.
    If you set the environment variable
    TMTRACE=*:ulog:dye
    for the server where the failure is happening then Tuxedo will write a trace record of each Tuxedo call and each XA call to the ULOG file. This can be helpful in determining why the failure is happening on the first call, especially if Tuxedo is handling transaction management using XA.
    I hope some of this is of help in debugging the problem.
    Ed

  • How to Modify Font Size at Application Level

    There is a requirement to change the font size at the application level for ease of readability. Is there an easy way to accomplish this requirement in APEX 3.0?
    Please advise.
    Thank you.
    ~Phyllis

    Ah, alright so then the font does not have to change size on request?
    You just want to increase the font size of a report or form?
    If you just want to increase the font size of everything, you can add this to your Page's header...
    <style type="text/css">
    * {font-size:20px;}
    </style>If you just want to change the font-size of something in particular, then you'll have to get the CSS it refers to (use Firebug in Firefox).
    For example, to change some headers and data in template 15...
    <style type="text/css">
    .t15RegionHeader
    font-size:12px;
    tr td.t15data
    font-family:verdana;
    font-size:10px;
    white-space:nowrap;
    th.t15header
    font-family:verdana;
    font-size:10px;
    color: #efefef;
    </style>Hope this helps.
    -Chris

  • How to view the table at the application level

    Dear All,
    How to view the table in the Data Dictionary at the application level, If a table is created at the database level by using CREATE statement.
    code/
    create table zmard as select * from sapone.mard where 1 = 2
    /code
    I would like to view the table above, which is created at the Oracle database level in the Data Dictionary.
    can anyone guess the solution.
    Best wishes
    Mahesh

    Hi
    U should create a program using SQL native in order to select and show the data.
    By SE11 or directly in the program u can define a structure like your table:
    DATA: BEGIN OF W_ZMARD,
                  FIELD,
              END     OF W_ZMARD.
    EXEC.
       OPEN CURSO FOR SELECT * FROM ZMARD
    ENDEXEC.
    DO.
      EXEC.
         FETCH NEXT CURSOR INTO :W_ZMARD
      ENDEXEC.
      IF SY-SUBRC <> 0.
         EXIT.
      ENDIF.
      WRITE: / W_ZMARD-FIELD,
    ENDDO.
    EXEC.
      CLOSE CURSOR
    ENDEXEC.
    I don't know if it's possible to create a view in SE11, because it's needs a table just defined in SE11, u can create a new view ZMARD based on MARD but I don't believe it'll use your table.
    Max

  • Validation on Application Level?

    Hi,
    is there the possibility to define a validation on application level? Couldn't find anything.
    I thought about a validation on page 0, but page 0 doesn't allow to create validations...
    Purpose: I want to validate the Apex_Application.g_fxx arrays. The validation will be the same for all pages.
    Thanks for your help
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

    Hi Vikas,
    thanks for the help. Just tried it out, didn't work :-(
    It does the redirect, but doesn't show the error message. I assume the g_validation_ids_in_error and g_item_ids_in_error has also to be set. But the redirect isn't good in my case anyway, because the tabular form entries are lost.
    But I just found out that APEX_Application.show_error does exactly what I was looking for!
    Thanks for your help
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

  • Can't access  Application level item

    Hi,
    I have set an Application level item. I have tried to assign it as a default value on a Page Item but nothing is being shown.
    Application Level Item: APP_USER_ID
    On New Instance computation:
    select user_id
    from isp_user
    where login_id=:APP_USER
    Page Item: P57_CREATED_BY
    Default Value: &APP_USER_ID.
    Default Type: Static Text with Session State Substitutions
    No value is displayed, but if I replace &APP_USER_ID. with &APP_USER a value is displayed.
    Thanks for any assistance.

    OK, I've simplified the scenario to avoid any confusion. I'll give you a step by step of what I think you are telling me and see how we go. Believe I feel like I've tried everything...sure it's just my inexperience with the tool.
    Via Shared Components/Items created....
    Application Level Item: APP_USER_ID
    On Page 57 of my Application I created a Before Header computation:
    Item Name: APP_USER_ID
    Type: SQL Query
    Computation Point: Before Header
    Computation: select 21 from dual
    I assigned this to be the default value for a database field on Page 57, defined as follows:
    Page Item: P57_CREATED_BY
    Display As: Text Field
    Source Used: Always,replacing any existing value in session state
    Source Type: Database Column
    Default Value: &APP_USER_ID.
    Default Value Type: Static Text with Session State Substitutions
    I logged out and logged back in. I checked Session State and saw that the APP_USER_ID Application Item exists but has not value.
    I navigated to Page 57... no value is displayed in the P57_CREATED_BY field... If I review the Session State I can see that APP_USER_ID Application Item has a value of 21.
    Changing &APP_USER_ID. to &APP_USER. displays a value which seems to indicate it is not an issue with the field definition.
    Hope that is a little clearer.
    Thanks, appreciate your help.
    Jona

Maybe you are looking for