Reporting on Max beans ever in cache
In the Weblogic 5.1 console, for Distributed Objects/EJB/Deployed Beans, on
the properties tab there are values for max beans ever in cache and max
cache size. Is there some way to access these values through a java class
(or some other way) so that I can do a report to see what EJBs have come
close to reaching their max cache size. We have over 500 beans deployed and
need some way to pro-actively check these values. I did not see any API doc
for the console on the website.
Thanks
You can start by looking at this example:
http://dima.dhs.org/misc/WLStats.jsp
and serverinfo utility at
http://developer.bea.com/code/alpha.jsp
Chip Whiteside <[email protected]> wrote:
In the Weblogic 5.1 console, for Distributed Objects/EJB/Deployed Beans, on
the properties tab there are values for max beans ever in cache and max
cache size. Is there some way to access these values through a java class
(or some other way) so that I can do a report to see what EJBs have come
close to reaching their max cache size. We have over 500 beans deployed and
need some way to pro-actively check these values. I did not see any API doc
for the console on the website.
Thanks--
Dimitri
Similar Messages
-
Max Beans in Cache causes NULL Pointer Exception
Hi All,
a rather weird event (from our perspective) occurs when we do the
following:
We have an entity bean set to max beans in cache 100 (default value of
our deployment tool ), the database table related to that bean holds
lets say 300 entries.
Doing a find all and in the same session bean instanciated transaction a
processing loop over the enumeration of beans we get an NULL Pointer
exception when accesing the 101 Bean. Neverthless the Weblogic server
increases the cache size automatically but obviously not fast enough and
not on time.
has anyone experienced the same problem and has a fix for it, appart
from increasing the cache size in the deployment descriptor ?
any help welcome
MichaelHi Michael.
Can you post the stack trace of the NullPointerException? Was it in
your code or ours? Also, what version of WebLogic are you using?
-- Rob
Rob Woollen
Software Engineer
BEA WebLogic
[email protected]
Michael Rupprecht wrote:
Hi All,
a rather weird event (from our perspective) occurs when we do the
following:
We have an entity bean set to max beans in cache 100 (default value of
our deployment tool ), the database table related to that bean holds
lets say 300 entries.
Doing a find all and in the same session bean instanciated transaction a
processing loop over the enumeration of beans we get an NULL Pointer
exception when accesing the 101 Bean. Neverthless the Weblogic server
increases the cache size automatically but obviously not fast enough and
not on time.
has anyone experienced the same problem and has a fix for it, appart
from increasing the cache size in the deployment descriptor ?
any help welcome
Michael -
Hi ,
I have the following parameter set in weblogic-ejb-jar.xml for a statefulsession bean.
==================================================
stateful-session-cache>
<max-beans-in-cache>2</max-beans-in-cache>
<idle-timeout-seconds>600</idle-timeout-seconds>
</stateful-session-cache>
==================================================
I then create more than 2 requests(approx 10) to the stateful session bean for which the above parameter is set.
In EJB-MONITORING-Stateful Ejbs I have the following fields set from the customize view:
Activation Count
Passivation Count
Cache Access Count
Cache Miss Count
Cached Beans Current Count
EJB Name
My understanding is that no more than 2 beans should appear in the Cached Beans Current Count.If the request is sent from more than 2 browsers invoking the stateful bean I should get Invocation Target exception.
But upon sending requests from more than 2 browsers invoking the same session bean I see that :
count of Cached Beans Current Count = number of browsers/clients from where the request is coming.
There is no exception.
Kindly clarify my understanding.
ThanksHi,
if you give some number in <max-beans-in-cache>number</max-beans-in-cache>.Then Weblogic Server going to create that many number of objects initially .
In case of statefull SessionBeans, If you give 3 ,Then Server creates 3 objects for that bean to provide service to the 3 clients at a time .
Whenever it receives the 4 requests at a time then three request's will be served at a time and 4th request will wait until the server passivate any object out of 3 in some persistant storage and create the object for 4th client.
it will not throw any exception or error if we sent more than number of requests which we were mention in max-beans-in-cache.
----Anilkumar kari -
Max-beans-in-cache ==== Error
Hi all,
I have a entity bean with max-beans-in-cache=5000 and one of the findByXXX fetches
more than that and the application stops with an exception. Is there anyway or
a strategy to follow when cases like this where the records of find exceeds the
max limit. This is a huge data process application and we tried to do maximum
filters to reduce the records to minimal.
Please help me with your thoughts or ideas to .. how to avoid or is there any
deployment time argument .. etc
using WL 7.0
Thanks
-arunIf you just invoke the finder, then the container should not complain
about bringing back > max-beans-in-cache elements. However if you try
to enlist > max-beans-in-cache beans in a transaction, it will throw a
CacheFull.
One way to avoid this is to limit your maxRows returned by the finder.
This can be done in the CMP descriptor.
-- Rob
Arun nair wrote:
Hi all,
I have a entity bean with max-beans-in-cache=5000 and one of the findByXXX fetches
more than that and the application stops with an exception. Is there anyway or
a strategy to follow when cases like this where the records of find exceeds the
max limit. This is a huge data process application and we tried to do maximum
filters to reduce the records to minimal.
Please help me with your thoughts or ideas to .. how to avoid or is there any
deployment time argument .. etc
using WL 7.0
Thanks
-arun -
Max-beans-in-cache, cachefullException, outOfMemoryError
Hi,
I am trying to find the best way to find the numbers to be set in max-beans-in-cache
for entity beans. I have a stateless session bean through which I access the entity
beans. If I don't set any value for this property, in some query which will return
2500 records, I get a cachefullexception and if I increase it and set this property
to say 5000, I get an outofmemory error. I am not sure how to decide what value
should be used. Any help or suggestion would be greatly appreciated. We are using
WLS 7.0 on NT machines in a cluster.
I have already tried the maxPermSize option in the jvm. The max heap size is
set to 768m.
Thanks,
JaideepPlease reply only to the newsgroup.
If you are doing a find and then invoking on the bean, splitting the transaction into
multiple transactions that return smaller sets of beans is the only thing I can think of to
get around the problem.
If you are simply doing a find, but not invoking the beans, you could set finders-load-bean
to false in the EJB deployment descriptor to avoid loading the bean when the finder is
called. The bean will then be loaded and put into the cache only when it is invoked.
However, this setting affects all finders defined on the bean and if you have transactions
that do a find and invoke, performance could be lower if set to false.
Unless relationship-caching is turned on, related beans are not loaded when a finder is
invoked.
Arunabh
"Chadha, Jaideep" wrote:
Thanks Arunabh. I tried different values and came
up with the ones that suite our needs. Also the
cache size is restricted in a transaction, we can
split the transactions into multiple transactions
especially for read-only data. Do you think that
would be a good idea? I was also thinking if it
was possible to define the attribute for the
entity beans especially in case of relationships that
they get loaded in finders when I need them but for
some methods they don't get loaded in finders. And
when a getXXX is invoked that particular bean gets
loaded at that time.
It will be helpful, if you could let me know.
Thanks,
JaideepArunabh Hazarika wrote:
Increasing the max-beans-in-cache will always mean higher memory requirements. Afraid
there is no way around it except to increase the max heap size. You could try a new
feature in WLS 7.0 - application level caches. This is specified in the application
deployment descriptor rather than at the bean deployment descriptor. With this cache,
the cache size can be specified in terms of memory-size rather than an instance-count.
You can find out how to set this from:
http://e-docs.bea.com/wls/docs70/programming/app_xml.html (search for entity-cache)
This cache would be shared across all EJBs in the application. Also, note that this will
not prevent CacheFullExceptions from occuring, but would be more useful in avoiding
OutOfMemory errors. To avoid CacheFullExceptions without indefinitely increasing the
heap size, try to limit the number of beans loaded in a single transaction.
Hope this helps
Arunabh
Jaideep wrote:
Hi,
I am trying to find the best way to find the numbers to be set in max-beans-in-cache
for entity beans. I have a stateless session bean through which I access the entity
beans. If I don't set any value for this property, in some query which will return
2500 records, I get a cachefullexception and if I increase it and set this property
to say 5000, I get an outofmemory error. I am not sure how to decide what value
should be used. Any help or suggestion would be greatly appreciated. We are using
WLS 7.0 on NT machines in a cluster.
I have already tried the maxPermSize option in the jvm. The max heap size is
set to 768m.
Thanks,
Jaideep -
Hi all
If I change max-beans-in-cache property then do I need to redeploy (run ejbc on)
the stateful session beans or will the server pick it up when I just restart the
app server.
I am using Weblogic 6.1 SP2
Regards
Kamran YousafI believe I was wondering this once myself. An easy way to find out is to change
the value and then restart the server and check the EJB's configuration in your
weblogic console.
You will need to redeploy the beans though which should happen automatically if
the timestamp on your ear file or jar file changes.
"kamran" <[email protected]> wrote:
>
Hi all
If I change max-beans-in-cache property then do I need to redeploy (run
ejbc on)
the stateful session beans or will the server pick it up when I just
restart the
app server.
I am using Weblogic 6.1 SP2
Regards
Kamran Yousaf -
Max-beans-in-cache, cachefullexception, outofmemory error
Hi,
I am trying to find the best way to find the numbers to be set in max-beans-in-cache
for entity beans. I have a stateless session bean through which I access the
entity beans. If I don't set any value for this property, in some query which
will return 2500 records, I get a cachefullexception and if I increase it and
set this property to say 5000, I get an outofmemory error.
I am not sure how to decide what value should be used.
Any help or suggestion would be greatly appreciated.
We are using WLS 7.0 on NT machines in a cluster.
Thanks,
JaideepIf you need to perform some sort of bulk processing then perhaps you
shouldn't be using
entity beans at all.
"Jaideep" <[email protected]> wrote in message
news:[email protected]..
>
unfortunately, for a specific functionality in our application we need toget that
many records. Now I am debating about changing the finder method so thatit returns
only 500 records at one time and then I can call it multiple number oftimes.
This may not be the best thing to do and we may take some kind of aperformance
hit also but it may avoid the cachefull and outofmemory problems.
Any suggestions or comments??
Thanks,
Jaideep
Rob Woollen <[email protected]> wrote:
First off, does what does the session bean or its caller do with the
2500 or 5000 records? i.e. do you really need to select that many.
Unfortunately there is no easy answer on how to set max-beans-in-cache.
It depends a lot on your memory, application, and load.
-- Rob
Jaideep wrote:
Hi,
I am trying to find the best way to find the numbers to be set in
max-beans-in-cache
for entity beans. I have a stateless session bean through which Iaccess the
entity beans. If I don't set any value for this property, in somequery which
will return 2500 records, I get a cachefullexception and if I increaseit and
set this property to say 5000, I get an outofmemory error.
I am not sure how to decide what value should be used.
Any help or suggestion would be greatly appreciated.
We are using WLS 7.0 on NT machines in a cluster.
Thanks,
Jaideep
Dimitri -
Max-beans-in-cache and getting mail
Hi,
Here is the situation. I am currently using the
max-beans-in-cache option in the stateful-session-cache . What I want to do is when the max bean amount has been reached and the bean is removed. At this point I would like to have an email or some kind of notification that this happened.
Does anybody have any idea how to do this?
thanks,
MarcHi,
Here is the situation. I am currently using the
max-beans-in-cache option in the stateful-session-cache . What I want to do is when the max bean amount has been reached and the bean is removed. At this point I would like to have an email or some kind of notification that this happened.
Does anybody have any idea how to do this?
thanks,
Marc -
Max-beans-in-cache, transactions and passivation
WLS 6.1 sp4
database concurrency, oracle
I compute max-beans-in-cache as:
(max # fetched in a transaction) * (number of worker threads)
therefore if I think that a table with have at most 500 rows and the
server is configured with 20 worker threads I have 500 * 20 = 10000 as
my max-beans-in-cache.
In my test the table has 7 rows. In our load test I see the Beans In
Use Count go up to 9999 instances and then start passivation.
I have two questions:
1) What does 'Beans In Use Count' really mean
2) why is weblogic using much more memory than it should to store 7 unique entities?
thanksSee my comments below.
S
Chad Urso McDaniel <[email protected]> wrote:
>
I understand this, but WebLogic should either reuse objects in the
cache/pool or not cache them at all. There are cases where the objects in the cahce are used. For e.g. with entity
beans and Read-Only concurrancy, when cache-between-tx is set. However I noticed
this behavior for other cases too and therefore the caching is not all that intellegent.
Also the beans in the pool are reused.
The current situation results in
objects being allocated, referenced by the cache so they will never be
garbage collected, but the objects are never used again once their
transaction completes. This is very, very wasteful with memory.
In some cases as mentioned above.
S
"Sri" <[email protected]> writes:
Hi,
The reason for having so many entries is due to fact that there isno way WLS
would know there are only 7 rows in the db everytime an entity beanis created/modified/accessed.
For e.g., if you run a test where you do 'findAll' the first run wouldhave 7
beans and the next most likely (There is another parameter that youcould use
to control number of beans in the cache, idle-timeout-seconds. Thoughits not
clear from the doc how the entity beans are handled wrt this parameter,it might
passivate entity beans if this timeout occurs) 14 and so on. If thisis a overhead
for your system then reduce this number.
S
container start removing beans before Chad Urso McDaniel <[email protected]>
wrote:
WLS 6.1 sp4
database concurrency, oracle
I compute max-beans-in-cache as:
(max # fetched in a transaction) * (number of worker threads)
therefore if I think that a table with have at most 500 rows and the
server is configured with 20 worker threads I have 500 * 20 = 10000as
my max-beans-in-cache.
In my test the table has 7 rows. In our load test I see the BeansIn
Use Count go up to 9999 instances and then start passivation.
I have two questions:
1) What does 'Beans In Use Count' really mean
2) why is weblogic using much more memory than it should to store7 unique
entities?
thanks -
Setting max bean pool size in MDB
Hi,
I need to set the max bean pool size for my MDB to 1. This MDB is a part of my application and is packaged in an ear.
I tried to set it with the following annotation -
import javax.ejb.*;
@MessageDriven
(mappedName = "MyQueue",
name = "MyMDB",
activationConfig = {
@ActivationConfigProperty(propertyName="maxBeansInFreePool",
propertyValue="1"),
@ActivationConfigProperty(propertyName="initialBeansInFreePool",
propertyValue="1"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
However, this does not seem to work since I see the Current pool count on the WLS console as 3 after processing is done.
After looking at various posts in this forum, I also tried it with weblogic ejbgen as follows-
import weblogic.ejbgen.*;
@MessageDriven(ejbName = "MyMDB",
destinationType = "javax.jms.Queue",
initialBeansInFreePool = "1",
maxBeansInFreePool = "1",
destinationJndiName = "MyQueue")
However, with this the MDB did not get deployed in WLS.
I am using Weblogic 10.3 / EJB 3.0.
Any help on this is greatly appreciated.
Thanks
MeeraAs far as I know, it currently isn't possible to set max-beans-in-free-pool via annotations. You can use a deployment plan (configurable from console and/or follow the link supplied by atheek1).
I think you can also automatically generate descriptors based on javadoc text via ejb-gen, I'm not quite sure if this tooling can work in conjunction with EJB 3.0 annotations. See http://download.oracle.com/docs/cd/E12840_01/wls/docs103/ejb/EJBGen_reference.html
Tom -
Will Result Cache improve the database performance in 11g? what is the max size of Result Cache?
Thanks for convincing me I really need a new laptop...
SQL> select /*+ result_cache */ count(*) from emp,emp,emp,emp,emp,emp,emp;
COUNT(*)
105413504
Elapsed: 00:00:52.94
SQL> select /*+ result_cache */ count(*) from emp,emp,emp,emp,emp,emp,emp;
COUNT(*)
105413504
Elapsed: 00:00:00.01
SQL> select /*+ result_cache */ count(*) from emp,emp,emp,emp,emp,emp,emp;
COUNT(*)
105413504
Elapsed: 00:00:00.01
SQL> select count(*) from emp,emp,emp,emp,emp,emp,emp;
COUNT(*)
105413504
Elapsed: 00:00:45.08
SQL> select count(*) from emp,emp,emp,emp,emp,emp,emp;
COUNT(*)
105413504
Elapsed: 00:01:16.29
SQL> select count(*) from emp,emp,emp,emp,emp,emp,emp;
COUNT(*)
105413504
Elapsed: 00:01:18.63
Message was edited by: Hoek
The result cache seems to have lagged a bit for the first hintless query.. -
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.
-
Min size for max-beans-in-cache / stateful EJB
Hello,
Weblogic (7 and 8) seems to have a minimum size for this setting.
This minimum seems to be around 8 instances because when we set it to 3 for
instance, the cache size reported by the admin console is 8 (with 8 active
clients) and no ejb has been passivated.
Is there an explanation for this behaviour ?
LaurentI would also like to know the answer to this one.
Can the default be changed via the administration console or config.xml? If so, where? -
Report Using A Stored Procedure Is Caching Data
Post Author: springerc69
CA Forum: Data Connectivity and SQL
I converted a report from a view that worked fine to a stored procedure to try and improve the performance of the report, but when I publish the report it seems to cache the data. When you change the parameters you use to call the report or simply run the report again with the original parameters the report doesn't run the sproc and just shows the cached data from the original request. If I right click on the report and select refresh (web based crystal report), it prompts for the parameters. I just close out the prompt window, report window and click on the link for the report again it returns the correct results based on the new parameters or a refresh based on the original parameters. I've checked the cache time setting and set it to 0, and if you close the Internet Explorer window that originally called the report, open IE back up and request the report it will return the appropriate data. I have also verify that the report is not setup to save data with report. This is on Crystal XI Server.Post Author: synapsevampire
CA Forum: Data Connectivity and SQL
Which viewer are you using?
It might be that your IE settings are caching the report pages. because you're using an HTML viewer.
Try the Active-X viewer.
I've forgotten which icon it is that changes the viewer...it's under the preferences options, I think it's the one that looks like a hunk of cheese on the right upper side.
-k -
Report with entity beans - BIG performance problem
I have several EJBs (CMP entity beans).
I need to build a report using linked EJBs and show this report
to a user (so, updates are not needed - report is only for web page demonstration).
the problem is: such report is generated too slow.
I have ~100 records in table 'TestResult' and ~500 records in table 'TestObject'.
these tables are linked like this:
one testobject <--> many testresults
for each testresult I need to show a line with some info which should be retrieved
from bound EJBs (e.g. testresult-testobject-assigneduser-prioritylevel)
how to optimize such report generation?
I have heard something about session beans with Value Objects.
do I need to use such session beans here?
what is a general solution for generating reports using linked EJBs?
I tried to solve the problem by using DB View, but it didn't help.
I have used 'TestResultView' - info is retrieved fast enough from this view
(several msecs), but displaying this info is still very costly.
please, help!
Oracle 8.1.7,
WebLogic 6.1Hi,
because I have checked the time required to
1) retrieve EJBS (several msec)Let me share some of my views with you.Once you retrieve the EJBS ie ie the collection of remote interface from the finder method the container is firing single "select " query and gets all the primary keys back.
2) cycle through it - get fields and display them
(~4000 msec)Now the cycle of getting the value you are getting the bean from the PooledState to ready state which will get the fields by firing the "select" query (ejbload()). Now in the instance you are invoking the multiple methods and at the end it will remain there in ready till you call the remove which u are not doing so the time out will bring it back to the pooledstate.
And if you are calling the bean very frequently then all the instances will go to the ready state and the activation & passivation will start developing ......
So at the end when the bean moves back to the pooled state after timeout the ejbStore() fires the "update " query!!!!
Let us consider the activation/passivation not appearing for simple understanding !!!!!!!!
So for each iteration you are firing 2 queries to the database.So if you have 500 records then the queries generatted will be 1(select from finder)+2(1 by select(ejbload)+1 by update(ejbStore))*500. So the flow is calling 1001 queries ...Thus quering about 1000 queries will definetly take some time...
So what is the solution????
Any way you dont require to fire the update query as you are just viewing the data...So u can stop calling the ejbStore().
Hence you queries will drop to half.Now how we can do this is by using the BMP.....
The other solution is using the Sessionbean and store the data all 500 records in the Object which can be called across the n/w. This object should implements the Serializable interface and this tech is the Transfer Object feature.....
Hope you find this useful..
regards
Vicky
Maybe you are looking for
-
I can't delete bookmarks page in my bookmarks list on toolbars, maybe there is a little bugs. Thx.
-
Help! I have had my iMac G5 fitted with new Logic Board but it doesn't work
Help! I have had my iMac G5 fitted with new Logic Board but it doesn't work I have just had my iMac G5 First Gen 1.8Ghz fitted with a new Logic Board under the Apple Repair Extension Programme for iMacs. I got the iMac home from the repairers and swi
-
Desktop no longer recognises iPhone is connected. How to restore?
Although my iPhone 5 displays in iTtunes, it no longer appears as a connected advice in my computer and in my MS Photo gallery. As I want to download photographs, this is more than an inconvenience. My Spacepack, in which the iPhone sits, does displ
-
Sessions Editor acting strangely (10.1.2)
Hello, I have a few odd problems with the Session Editor. Maybe its my windows platform but I cant explain it. I make my changes to the sessions.xml using the Session Editor and save them to the file system. As long as I am logged in to my windows it
-
Having multiple open periods in GL
what is the best practice for closing periods in GL when: a) you have 48 open open periods b) 22000 unposted journals (Some mass allocation, some imported from spreadsheets) varying from early as 2002. c) no evidence that close process for Create B