EJB Cache

Hi!
I am having trouble figuring out how to do sessions in web services. For this porpouse I would like to use a cache in an EJB container...
How could I make this cache, so that there is only one instance per cluster???

Thanks swatdba,
But I am trying to keep my app portable.
I think I am going to do a singleton.
Better to have one cache per VM rather not have any at all.

Similar Messages

  • XML Event casuing EJB cache limit to be reached

    I am running WLS 6.1 (sp2) and WLI 2.1 (sp2). My workflows are completely XML event
    driven. After the workflow is started a number of events are created that wait
    for different state changes to be posted th the JMS queue. During testing this
    seemed to work fine. However, I have now moved to production and things are falling
    apart.
    I have 100+ active workflows at any given time. They all have the same XML event
    active, which checks a conditional field to determine if it should handle the
    event. When the number of active workflows reached 100 I start receiving CacheFullException
    whenever the workflow engine attempts to process the event.
    Is there some way to increase the default EJB cache size for the WLI beans? How
    does WLI process these events so that the cache limit comes into play? Is there
    some way to change the structure of my workflow so that this limit is no longer
    a problem?
    Any suggestions will be greatly appreciated.
    Thanks,
    Pete Giesin

    I am running WLS 6.1 (sp2) and WLI 2.1 (sp2). My workflows are completely XML event
    driven. After the workflow is started a number of events are created that wait
    for different state changes to be posted th the JMS queue. During testing this
    seemed to work fine. However, I have now moved to production and things are falling
    apart.
    I have 100+ active workflows at any given time. They all have the same XML event
    active, which checks a conditional field to determine if it should handle the
    event. When the number of active workflows reached 100 I start receiving CacheFullException
    whenever the workflow engine attempts to process the event.
    Is there some way to increase the default EJB cache size for the WLI beans? How
    does WLI process these events so that the cache limit comes into play? Is there
    some way to change the structure of my workflow so that this limit is no longer
    a problem?
    Any suggestions will be greatly appreciated.
    Thanks,
    Pete Giesin

  • Controlling EJB Cache & Warning BEA-010001 in 8.1

    Background: Migrated from 6.1 to 8.1. Using CMP with template.j modified (migrated).
    Problem:
    1. Could not use any Entities which uses Entity Cache. It throws weblogic.ejb20.cache.CacheFullException
    during ejbLoad. My existing Cache parameters are (anyway, it is no different from
    6.1 where itz working fine)
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </pool>
    <entity-cache>
    <max-beans-in-cache>100</max-beans-in-cache>
    <idle-timeout-seconds>610</idle-timeout-seconds>
    <read-timeout-seconds>60</read-timeout-seconds>
    <concurrency-strategy>Database</concurrency-strategy>
    </entity-cache>
    Is there any new configuration which needs to be set for 8.1? Redirection to
    some checklist for controlling there cache parameter would be helpful?
    2. While deploying my Beans it shows up Warning BEA-010001. Documentation says,
    specify in weblogic-ejb-jar.xml<weblogic-ejb-jar> <disable-warning>BEA-010001
    | BEA-010054</disable-warning>..</weblogic-ejb-jar>. I have thousands of beans
    deployed in the server my warning message dumps my console with these messages
    hiding critical error messages. Is there any 'additional parameters' to stop
    this warning or route this warning to a separate log file?
    TIA
    JAK

    Hi Jak,
    max-beans-in-cache equal 100 is way too low for any real life application.
    I'm not sure why it worked for you in 6.1. I remember setting it was broken
    in 6.1 at some point.
    Regards,
    Slava Imeshev
    "jak" <[email protected]> wrote in message
    news:3f07e7c9$[email protected]..
    >
    Background: Migrated from 6.1 to 8.1. Using CMP with template.j modified(migrated).
    >
    Problem:
    1. Could not use any Entities which uses Entity Cache. It throwsweblogic.ejb20.cache.CacheFullException
    during ejbLoad. My existing Cache parameters are (anyway, it is nodifferent from
    6.1 where itz working fine)
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </pool>
    <entity-cache>
    <max-beans-in-cache>100</max-beans-in-cache>
    <idle-timeout-seconds>610</idle-timeout-seconds>
    <read-timeout-seconds>60</read-timeout-seconds>
    <concurrency-strategy>Database</concurrency-strategy>
    </entity-cache>
    Is there any new configuration which needs to be set for 8.1? Redirectionto
    some checklist for controlling there cache parameter would be helpful?
    2. While deploying my Beans it shows up Warning BEA-010001. Documentationsays,
    specify in weblogic-ejb-jar.xml<weblogic-ejb-jar><disable-warning>BEA-010001
    | BEA-010054</disable-warning>..</weblogic-ejb-jar>. I have thousands ofbeans
    deployed in the server my warning message dumps my console with thesemessages
    hiding critical error messages. Is there any 'additional parameters' tostop
    this warning or route this warning to a separate log file?
    TIA
    JAK

  • How to get the EJB "Cached Beans Current Count" in Command-Line

    I use WebLogic console to monitor EJB's "Cached Beans Current Count" property in monitor tab, but I want to get the result in Command-Line using "weblogc.Admin".
    What arguments to be used?
    I can get the EJB property use:
    java -cp weblogic.jar weblogic.Admin -url t3://svr:7001 -username weblogic -password weblogic GET -mbean mydomain:Application=myear,Name=myejb
    .jar,Type=EJBComponent
    How can I to get the "Cached Beans Current Count"

    Hello,
    This should do the trick
    $JAVA_HOME/bin/java -cp $CLASSPATH weblogic.Admin -url <server_url> -username <username> -password <password> GET -pretty -type EJBCacheRuntime -property CachedBeansCurrentCount
    Also see http://e-docs.bea.com/wls/docs81/admin_ref/cli.html for more info.
    Cheers,
    Hoos
    Message was edited by hoos at Nov 29, 2004 1:50 AM

  • Servlet - EJB, caching home & context problem

    Hello,
    I just run into the following problem:
    I created a thin client which accesses the EJB's via a servlet.
    In this servlet I cached the InitialContext und and the reference
    to the Home interface. While creating the initial context I provided
    login/password to access the EJB so it can't be accessed from the guest
    user.
    The first method call works as expected, any further call results
    in a RemoteException - Insufficent permissions.
    Any hints? I'm using 5.1, SP6.
    Zhanxs in advance
    Marcel

    The security creditials you suppplied to the IntialContext are only applied
    to the thread that created the InitialContext. I have only found one
    work-around - Construct an otherwise useless IntialContext each time a
    thread attempts to use and EJB or its home. This is inefficient and almost
    (not quite) destroys the advantage of caching the stubs.
    Is there any other solution? Any thing coming down the pike?
    Chuck McCorvey
    "Marcel Zielinski" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I just run into the following problem:
    I created a thin client which accesses the EJB's via a servlet.
    In this servlet I cached the InitialContext und and the reference
    to the Home interface. While creating the initial context I provided
    login/password to access the EJB so it can't be accessed from the guest
    user.
    The first method call works as expected, any further call results
    in a RemoteException - Insufficent permissions.
    Any hints? I'm using 5.1, SP6.
    Zhanxs in advance
    Marcel

  • Invalidate EJB Caching

    Hi
    I'm using Sun Application Server 8, where i'm deploying some CMPs
    I was wondering how can i Invalidate the Cache SAS8 makes for each of my CMPs
    In Caucho i can do this
    com.caucho.ejb.admin.EJBAdmin.invalidateCache()
    In WebLogic i have
    public void invalidate(Object pk) throws RemoteException;
    public void invalidate (Collection pks) throws RemoteException;
    public void invalidateAll() throws RemoteException;
    How can i do it in SAS8 ?
    Thanks

    Can you explain what use-case you're trying to support? Are you talking about invalidating a cache within a transaction or outisde of a transaction? Our EJB 2.x CMP implementation doesn't use a non-transactional JVM-specific cache so there's no need for the application to invalidate anything. Each new transaction will have the latest view of the database.
    The only place in App Server 8 where we use a non-transactional cache is for our Read Only Bean feature.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Invalidate EJB cache using JMS ibm.websphere.ejbpersistence.InvalidateTCF

    Hi,
    I work with WSAD 5.1, and I need to invalidate manually some EJB entities in cache. After looking for information in websphere documentation, it seems that I have to use JMS to do this.
    I create an Object PMCacheInvalidationRequest, and It seems that i have to publish it.
    I found in websphere documentation some indications, based on a topicConnectionFactoryJNDIName named "com.ibm.websphere.ejbpersistence.InvalidateTCF".
    Is someone has already work on it? Is someone can help me to understand if I have to parameter something in my server?
    Thanks.

    Please,
    nobody has used this API PMCacheInvalidationRequest with JMS? Or is my message not comprehensible?
    Thanks

  • Weblogic  EJB Cache full exception

    For my application i am using weblogic 4.5.1, and while running the server i am getting
    an exception "weblogic.ejb.extensions.CacheFullException:".
    Though i have restarted the server still the problem persists, can you give suggestion
    how i can resolve this.
    [exception.doc]

    You'll get a CacheFullException if you exceed the max-beans-in-cache
    4.5.1 is pretty old right now, and I don't believe it's even supported anymore. I'd
    suggest upgrading if possible.
    -- Rob
    Vetriselvan wrote:
    For my application i am using weblogic 4.5.1, and while running the server i am getting
    an exception "weblogic.ejb.extensions.CacheFullException:".
    Though i have restarted the server still the problem persists, can you give suggestion
    how i can resolve this.
    Name: exception.doc
    exception.doc Type: Microsoft Word Document (application/msword)
    Encoding: base64

  • Clearing ejb cache

    I'm using weblogic application server 7.0 sp5 with some ejb entity bean in exclusive mode.
    I'm looking for a way to refresh my ejb entity cache without redelploy my ejb.jar or restart my server.
    Is there a way to do that dynamically ?
    I'm suprised that weblogic 7.0.5 console do not allow me to to that !!!!!

    Is it an applet, or a JWS application?

  • Ejb caching values

    Hi,
    I am using Ejb 2.0 in Jboss 4.2.3
    My application is holding the previous values.Suppose I am searching in my application with some key values.The next time when I come to that page the previously given values are showing.
    But in weblogic 8 this behaviour is not showing. There is no previous values contained in case of weblogic.
    Please help.

    Sorry, but you are too vague.
    You talk about EJBs, but as far as I can tell you are then referring to some web logic, are you not? What are you really having trouble with? web page caching?

  • What happens to cached ejbs when i update records directly

    hi:
    i am working on a project which weblogic as app server. there's many cases
    in my application where we have to update large number of records(about
    fifty thousands) in
    a loop one at a time. we have tried with entity beans but it 's so slow.
    so in this case we have to update database directly. but i am worried about
    my code accessing record with entity beans. the entities caches state and i
    am
    afraid there will be trouble if the state in ejb caches and record in db
    mismatch . i change state in db directly and ejbs has no way to know about
    it.
    is there any solution?
    thanks in advance!
    daniel

    With WLS V5.1.0, I was having same problem. BEA Backline support duplicated problem (CMP beans). The last I heard - they expect to have patch in mid-Feb. 2002. Reference: "primary key caching" and CR064019.

  • Caching & thread in ejb

    Hi,
    In order to gain better performance in our current application
    we need to cache some data in both web and ejb tier. Data that
    we need to store is not client specific (global data) and rarely
    changes. In web tier we cache this kind of data in
    ServletContext. We are trying to find a way to store data in ejb
    tier. In our design we use only Stateless Session Beans in which
    we have JDBC calls to access DB. In particular case we need to
    get some data from DB that is specific to current date. So,
    ideally we would like to fetch that data when ejb server starts,
    store it and refresh it at midnight. So, if this was not an ejb
    application we would probably use Singleton to store this data
    and have some thread that will wake up at 0:00 to refresh
    state of the singleton object.
    I would really appreciate any suggestion.
    Regards,
    Ilija

    Making it ReadOnly will ensure that ejbLoad is not called. Also,
    if you use 6.1, generated home implements weblogic.ejb.Caching[Local]Home,
    which makes invalidations (local and in cluster) easier.
    Ilija <[email protected]> wrote:
    Thanks. I have few more questions regarding caching. I am not
    sure if what I am doing is completely correct.I have entity ejb
    with bean managed persistence that caches data. Data is
    retrieved from multiple tables and there is no real bean dentity
    in DB.
    ejbFindByPrimaryKey does not go to DB, it simply returns passes String value(primary
    key).
    ejbLoad() loads everything from DB and initialize instance of
    the bean.
    ejbRemove() does not do anything.
    ejbStore() does not do anything.
    ejbActivate() does not do anything
    ejbPasivate does not do anything
    invalidate() throws RemoteException
    baean is deployed with NotSupported transaction attribute.
    Everything seems to be working OK. I am wandering if there is any
    benefits of making this bean as a read only since ejbStore does
    not do anything in my case.
    Dimitri Rakitine <[email protected]> wrote:
    That's what I did - I wrote my own implementation of JMX timer.
    Anyway, this deprecation of time services is a little confusing. I saw
    2 replacement recommendations in WebLogic docs (both unacceptable) -
    use
    java.util.Timer, or purchase Flux.
    On the other hand, time services work just fine in 6.1.
    Ilija <[email protected]> wrote:
    Thanks Dimitri. I see that weblogic deprecated api for trigger andI am curios
    if it would be correct to have my own scheduler in web tier that willinvalidate
    this ejb.
    Dimitri Rakitine <[email protected]> wrote:
    Schedule a trigger which will invalidate RO bean(s) at midnight ?
    Ilija <[email protected]> wrote:
    Thank you for your suggestions Rob. I guess read only entity beansare very close
    to what we need. The only issue I can see is the fact that we haveto update state
    of this bean at midnight. Since we are not supposed to create threadin ejb container
    what do you suggest as a way to do that?
    Regards,
    Ilija
    Rob Woollen <[email protected]> wrote:
    Ilija wrote:
    Hi,
    In order to gain better performance in our current application
    we need to cache some data in both web and ejb tier. Data that
    we need to store is not client specific (global data) and rarely
    changes. In web tier we cache this kind of data in
    ServletContext.I would suggest that you use the JSP Cache tags and Cache filters
    in
    WLS for caching in the web tier. They will allow you to cache pages
    or
    page fragments.
    We are trying to find a way to store data in ejb
    tier. In our design we use only Stateless Session Beans in which
    we have JDBC calls to access DB. In particular case we need to
    get some data from DB that is specific to current date. So,
    ideally we would like to fetch that data when ejb server starts,
    store it and refresh it at midnight. So, if this was not an ejb
    application we would probably use Singleton to store this data
    and have some thread that will wake up at 0:00 to refresh
    state of the singleton object.
    Take a look at Read-Only entity beans.
    -- Rob
    I would really appreciate any suggestion.
    Regards,
    Ilija
    Dimitri--
    Dimitri
    Dimitri

  • Question for Steve Muench - ADF/EJB & Applets?

    Steve or anyone who can help - Do you have any sample demo that can demonstrate how to take advantage of ADF caching technology on the server, or an EJB solution integrated with an applet in a web application?
    It is kind of late in the game, because we are about to roll out an application in our company, nevertheless we are still researching a better way for handling tremendous amount of data by our applet. We are using F1 Formula engine (spreadsheet like tech) in our applet. But, we have severe performance problems, especially in our remote locations trying to load thousands of rows in the applet and on top of that do all kinds of formatting and Excel like functionality in the applet grid at run time.
    We are looking for a way to integrate ADF or EJB caching solution with our applet, so that we can cache the client data on the app server if possible, in order to improve performance.
    Any guidance, suggestion and help is very much appreciated.
    Thanks,
    [email protected]

    Hi,
    my recommendation would be to use JavaWeb Start with BC deployed as EJB to the Application Server. This way you have a real client installation and don't need to download the Applet classes all the time (and JClient, assuming you use JClient, comes with a couple of libraries slowing down the initial application startup). Using EJB on the middle tier allows you to use batch mode, which reduces the number of roundtrips between the client and the server. Note that the default implementation is synchronous, which is more chatty.
    Frank

  • Transaction problem in ejb

    Hi
    I have a problem related to CMP entity beans.
    I am using Oracle 9i and weblogic 6.1
    Here is the description of the problem.
    The transaction attribute of all the beans is set to 'Required'.
    I have a PersonBean (CMP) in Person.jar mapping to Person table along with other
    beans.
    I have a MemberBean(CMP) in Member.jar file mapping to Member table along with
    many other beans.
    There is a one to many relation ship between person and member tables in Oracle
    9i database :
    Id in the person table is the P_Key and Person_Id in Member table is the related
    foreign key.
    No relationship was made between Person and Member beans as there were in two
    different jar files with different deployment descriptors.
    I have a stateless session bean PersonService bean.
    There is a method in PersonService bean called createPerson(String name);
    This method creates Person in the database using Person p = PersonHome.create(),
    long personId = p.getId()..returns the primary key of the person.
    PersonService calls createMember(long personId) now.
    which will try to create a Member record in the database using the personId.
    Now the Member bean fails to create and the transaction is rolled back with a
    foreign_key violation exception.
    because it cannot locate the Person EJB Primary key entry in the underlying table.
    But the EJB cache is still inserted properly with Person EJB (findByPrimaryKey
    works).
    I feel that Member bean is not able to participate in the same transaction of
    the Person bean inspite of keeping the transaction attribute to 'Required'.
    When I keep the transaction of Person bean to 'RequiresNew', then the transation
    of createPerson is getting committed and Member is starting a New transaction
    and it gets created.
    But I donot want like this.
    I want all the beans to be participating in the same transaction.
    According to Oracle / Weblogic documentation the default database isolation mode
    Read_Committed should allow participants in transaction to see uncommitted data
    while participants outside the transaction see only committed data. I have tried
    other dataabase isolation modes (such as Read_Uncommitted, "Serializable") these
    appear to either create other problems or not have an affect.
    Any solution to this problem is highly appreciated.
    Thanks
    Lavanya

    Previously our code was running on Weblogic where
    methodA() -> Transaction Attribute -> Supports
    methodB() -> Transaction Attribute -> Required
    But in JBOSS in order to run the same thing we have to do
    methodA() -> Transaction Attribute -> Required
    methodB() -> Transaction Attribute -> Required
    Any Pointers??

  • How to determine the value of max-beans-in-cache

              As we have CacheFullException problem, but I dont know what is the side effect
              if I set an extremely large value for this parament. Is there any proper way
              to determine the proper value?
              

              "Jenny Wong" <[email protected]> wrote:
              >
              >As we have CacheFullException problem, but I dont know what is the side
              >effect
              >if I set an extremely large value for this parament. Is there any proper
              >way
              >to determine the proper value?
              Hi Jenny,
              The WebLogic Server allows you to configure the number of active beans (with an
              identity) which are present in the EJB cache.
              This cache is the in-memory space where beans exist.
              When a bean is brought into the cache, ejbActivate() is called, when it is removed,
              ejbPassivate() is called. It is basically
              equivalent to virtual memory being kept in memory or on disk. Tuning it too high
              will use up memory unnecessarily.
              Activation and passivation of EJBs is analogous to virtual memory on a computer.
              You want to minimize the number of times that
              your beans are activated and passivated. The cache size can help minimize this
              activity. To set determine if you cache size
              should be bigger, take a number of execution snapshots. Look at these snapshots
              of your execution and see if there is a lot of
              passivation and activation going on. If so, increase the size of your cache and
              see if performance improves. Otherwise, leave this
              value alone.
              regards,
              Ashok.
              

Maybe you are looking for

  • Considering Switching to Mac - Data on File Server - HELP!

    Hi- I'm a Windows-on-the-desktop user with a whole bunch of iOS devices and I am thinking of switching to Mac as of Lion / Lion Server.  I tried the Mac a few years ago and got frustrated pretty quickly because of the inability of multiple users to s

  • Imac 20" N. American model to be used in Europe

    I am having an iMac 20" come from Canada but I would like to know if they absolutely work here in Europe. Apparently there were manufacturing processes/decisions with the iMac G5 that lead those models to fail if plugged in to European sockets. Of co

  • How to get the user name from Single Sign On Process?

    Post Author: sasikumar CA Forum: Authentication I am loging in Single Sign On Page. Then it goes to one JSP which lists out some links including InfoView link. While clicking InfoView link, I need to pass user name with the url for authentication. Ho

  • #ERROR WITH DIVISION IN WEBI XIR2

    Post Author: David-Abiodun Oloruntoye CA Forum: WebIntelligence Reporting I have a calculation like this: DIM1 COL 1 COL2% A 1 1/55 B 2 2/55 C 3 3/55 D 4 4/55 E 5 5/55 F 6 6/55 G 7 7/55 H 8 8/55 I 9 9/55 J 10 10/55 Total 55 My challenge is that when

  • Memory allocation profiling - where is it going?

    I am profiling a Swing application that seems to be using more memory than expected - Windows task manager (which I don't necessarily trust) reports that the Java process hogs 400MB+ of memory. However, profiling with JProfiler indicates that heap us