Discussions

EJB programming & troubleshooting: cachefullexception in ejbCreate using Weblogic AppServer

  1. All,
    I get cachefullexception while I try to do EJB create(entity beans).
    Can anyone give suggestions.
    Detailed explanation of the problem.
    I have to put message on to a JMS queue. But before sending the message to the queue I have to persist the data so I create that many instances value objects and then call the ejbCreate simultaneously to insert into database in a loop which is when I get cachefullexception when I try to send 5000 messages.
    So to avoid this, I Configured an application level cache to be 20000 for max-beans-in-cache, in weblogic-application.xml and tested my application under max load. Yet I get the CachefullException error.
    And also deploying the application has become a pain. Everytime I have to dismount the server itself since I get OutOfMemoryerror while deployment.
    Can anyone tell me any other option.
    Please need help.

    Thanks in Advance.
  2. All,I get cachefullexception while I try to do EJB create(entity beans). Can anyone give suggestions.Detailed explanation of the problem.I have to put message on to a JMS queue. But before sending the message to the queue I have to persist the data so I create that many instances value objects and then call the ejbCreate simultaneously to insert into database in a loop which is when I get cachefullexception when I try to send 5000 messages.So to avoid this, I Configured an application level cache to be 20000 for max-beans-in-cache, in weblogic-application.xml and tested my application under max load. Yet I get the CachefullException error.And also deploying the application has become a pain. Everytime I have to dismount the server itself since I get OutOfMemoryerror while deployment.Can anyone tell me any other option.Please need help.Thanks in Advance.


    Hi,

    Actually EJB's are not used for massive insertion or updation of bulk data.....

    Try using simple jdbc connection in jms to insert data into database instead of calling entity bean....

    Actually the performance of ejb is worse in case of massive data such as in ur case (5000 inserts)

    The EJB's TX is very unpredictable and may exceed the max-beans-in-cache in your case because of large numbers of same type of beans.............

    Bye,
    Sanket Raut
  3. hi
       Use this option in your startWeblogic.cmd for stopping out of memory exception.These options are for JVM memory allocations..-ms,mx for e.g.

    %JAVA_HOME%\bin\java" -server -ms256m -mx512m

    this is the place where you set classpath,domain etc...
  4. Am little confused.
    If you are getting error on the deployment time then it has absolutely nothing to do with how much number of beans want to create. You say invoke simultaneously to create some thousand beans How you managed to do that?
    Even you can able to do as many inserts you want to do with a single bean in the dd just it will be synchronized.

    Can you please paste the stack trace you are getting