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
Meera

As 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

Similar Messages

  • Set maximum session bean pool size?

    Using the embedded OC4J, how can I set the maximum pool size for my session beans? I am using Jdeveloper 10g. Do I have to manually edit some XML file?

    Set the system property com.sun.jndi.ldap.connect.pool.maxsize
    System.setProperty("com.sun.jndi.ldap.connect.pool.maxsize", "25");

  • Guidelines for setting Application Module Pool Size Parameters?

    Are there guidelines for setting the application module pool size parameters, such as initial pool size, maximum pool size, etc., based on the expected number of users or other factors? I've read the developer guide sections (ch 28-29), but still don't have a good feel for how to correctly set the optimal values for the pool configuration parameters? Even more importanty, how do I monitor the pool's efficiency during runtime to determine if the pooling parameters are configured correctly?
    This will be critical to performance and scalability, so I'm looking for a way to get some visibility into how the pooling is working during production operation to assess whether there are bottlenecks/constraints/ineffeciencies?
    Note I am using Tomcat as the java runtime container; ADF BC / JSF jdev 10.1.3.1
    Thanks in advance and Merry Christmas!

    KUBA - were you able to resolve these issues and if so are there any lessons learned you can share?
    I'm hoping someone from the ADF team can answer our original question including guidelines for setting pool parameters and how to monitor the pool's performance while running in production.
    thanks

  • Dynmically setting max bean count?

    Hi,
    With the applications we deploy we want to insure that the bean
    pool and thread pool are inited at their maximum value. The only
    thing is that depending on what machine we deploy the maximum
    would not be the same, due to memory or processor constraints.
    Currently we have to define these values manually. Is there any
    way for us to write a plug-in to automatically set these values
    based on an algorithm?
    regards
    Andre

    Hello,
    I think you can write a script that uses weblogic.Admin utility to automate this process after deploying your beans.
    I can't remember if you can control the specific ejb properties you require, have a look at:
    http://edocs.bea.com/wls/docs81/admin_ref/cli.html

  • Unable to set max log file size to unlimited

    Hi all,
    Hoping someone can give me an explanation of an oddity I've had. I have a series of fairly large databases. I wanted the make the database log files 8GB in size with 8GB growth increments with
    unlimited maximum file size. So, I wrote the script below. It seems to have worked but the database max size doesn't show as unlimited, it shows as 2,097,152MB and cannot be set to unlimited using a script or in SSMS by clicking on the unlimited radio button.
    2TB is effectively unlimited anyway but why show that rather than actually setting it to unlimited?
    USE
    [master]
    GO
    --- Note: this only works for SIMPLE RECOVERY MODE. FOR FULL / BULK RECOVERY modes you need to backup the transaction log instead of a CHECKPOINT.
    DECLARE
    @debug
    varchar(1)
    SET @debug =
    'Y'
    DECLARE
    @database
    varchar(255)
    DECLARE
    @logicalname
    varchar(255)
    DECLARE
    @command
    varchar(8000)
    DECLARE
    database_cursor
    CURSOR LOCAL
    FAST_FORWARD FOR
    select
    DB_NAME(database_id)
    as DatabaseName
    name
    as LogicalName
    from
    master.sys.master_files
    where
    file_id
    = 2
    AND type_desc
    = 'LOG'
    AND physical_name
    LIKE '%_log.ldf'
    AND
    DB_NAME(database_id)
    NOT IN('master','model','msdb','tempdb')
    OPEN
    database_cursor
    FETCH
    NEXT FROM database_cursor
    into @database,@logicalname
    WHILE
    @@FETCH_STATUS
    = 0
    BEGIN
    SET
    @command
    = '
    USE ['
    + @database
    + ']
    CHECKPOINT
    DBCC SHRINKFILE('''
    + @logicalname
    + ''', TRUNCATEONLY)
    IF
    (@debug='Y')
    BEGIN
    PRINT
    @command
    END
    exec
    (@command)
    SET
    @command
    = '
    USE master
    ALTER DATABASE ['
    + @database
    + ']
    MODIFY FILE
    ( NAME = '''
    + @logicalname
    + '''
    , SIZE = 8000MB
    ALTER DATABASE ['
    + @database
    + ']
    MODIFY FILE
    ( NAME = '''
    + @logicalname
    + '''
    , MAXSIZE = UNLIMITED
    , FILEGROWTH = 8000MB
    IF
    (@debug='Y')
    BEGIN
    PRINT
    @command
    END
    exec
    (@command)
    FETCH
    NEXT FROM database_cursor
    INTO @database,@logicalname
    END
    CLOSE
    database_cursor
    DEALLOCATE
    database_cursor

    Hi,
    http://technet.microsoft.com/en-us/library/ms143432.aspx
    File size (data)
    16 terabytes
    16 terabytes
    File size (log)
    2 terabytes
    2 terabytes
    Thanks, Andrew
    My blog...

  • To limit the number of beans pooled in entity-cache

    here are the issues in the problem.
    1. would like to make sure there are NO More than N beans in the entity cache.
    2. if I set max-beans-in-free-pool, problem seems to be this: if I need to retrieve more than (N+1) rows from DB, weblogic retrieves ONLY N beans because it reached the max-beans-in-free-pool. That behaviour is not desirable, of course.
    so, how does one set the entity-cache params, to
    1. retrieve as many entity beans as required - regardless of the param max-beans-in-free-pool
    2. let weblogic grow the entity cache to as big a cache as required - but then shrink it back to "some specified" cache size after idle-timeout. whats the param for that?
    any help in understanding these issues would be great.

    HI,
    You can make use of feature to maintain maximum and minimum limits per condition type.
    SPRO > SAP Implementation Guide > Customer Relationship Management > Basic Functions > Pricing > Define Settings for Pricing > Create Minimum/Maximum Limits
    In this activity you can restrict manual processing of pricing conditions in transactions using minimum and maximum limits per condition type.
    Kindly reward with points in case helpful
    Sharif

  • Entity Bean Pool

    Weblogic(6.1) deployment descriptor allows configuration of entity bean pool size
    and cache size. Since calls from multiple clients to the same entity bean are
    serialized what is the benefit of having multiple instances in an entity bean
    pool?
    Thanks,
    Stefan

    Anand,
    Of course I don't talk about an extreme case of a table with one row!?, but the
    same (logical) entity bean with same primary key accessed by multiple clients.
    Each client will use findByPrimaryKey method and will get a reference to same
    entity bean mapped to the same "row" in database . My surprise was that even for
    this case there are multiple entity instances created in the pool for one row
    in the database. For multiple instances mapped to multiple rows we concluded all
    makes sense.
    thanks again,
    Stefan
    "Anand Byrappagari" <[email protected]> wrote:
    Stefan,
    I am not sure I understand your question but if you are asking why
    have
    pooling, pool of instances is a feature for all types of entity beans.
    In
    the specific case that you have where the table has only one row it has
    limited application but the general case is that you lave multiple rows
    in a
    table. For example, an Address table will in all probability have hundereds
    of addresses of customers. An application accessing this table will be
    accessing multiple address instances at any given time. So each of this
    instances should be accessable independently hence the pool makes sense
    in
    this case. I point I am trying to make is that when you define a pool
    for a
    bean (AddressBean) you are not defining the pool for one instance of
    the
    bean type(like address_1). The pool specifies the number of instances
    (address_1, address_2, ...., address_n) that can exist at any given time.
    Are you asking if the pool size is for each row? That is if pool
    size is
    set to 10, are you asking if you can have atmost 10 instances of address_1
    as opposed to 10 instances of any address? The pool and cache sizes refer
    to
    the limit on any instances and not on 1 instance.
    Even in the extreme case like the one you mention where the table
    has
    only one row, there is some utility in having multiple instances as this
    would not require serializing access to the bean - in exclusive strategy,
    once a client has locked an EJB instance, other clients are blocked from
    the
    EJB's data even if they intend only to read the persistent fields. If
    you
    set the strategy to database then multiple instances can access the data
    depending on the isolation levels you have set. Read Chapter 4 of
    "Programming Weblogic Enterprise JavaBeans" for more information.
    Hope this helps.
    -- Anand
    "Stefan" <[email protected]> wrote in message
    news:[email protected]...
    Anand,
    If we established that same databse row can be mapped to multiple entitybeans
    instances we are back to my original question: Assuming "database"concurrency
    strategy, how do you see this model useful if calls from multiple clientsare
    serialized across all these instances? I cannot point out the benefitof
    the pool
    of entity bean instances for same row since they all wait for a clientcall to
    finish before replying to another client. Where is the benefit of havingmultiple
    instances if one instance would do the same job?
    thanks,
    Stefan
    "Anand Byrappagari" <[email protected]> wrote:
    The default concurrency-strategy in weblogic 6.1 is database which
    means
    that concurrency is taken care of at the database, this model allows
    you to
    have multiple ejb object instances for the same row in the database.
    If you
    want a single instance then you can set <concurrency-strategy> element
    in
    the deployment descriptor for the ejb to Exclusive.
    -- Anand
    "Stefan" <[email protected]> wrote in message
    news:[email protected]...
    Thanks Anand,
    Sure this way it makes total sense. However I used an example whereI was
    referencing
    only one row from multiple clients. For this case using the WeblogicConsole I
    saw the number of bean instances growing. This would indicate thatsame
    row is
    mapped to multiple bean instances in the pool, which prompted my
    question.
    Stefan
    "Anand Byrappagari" <[email protected]> wrote:
    Think of entity beans as mapping to a row in a database. Access
    to
    a
    single
    row is synchronized not to all the rows. So it still makes sense
    to
    have
    multiple instances possibly mapping to multiple rows in the database.
    -- Anand
    "stefan" <[email protected]> wrote in message
    news:[email protected]...
    Weblogic(6.1) deployment descriptor allows configuration of entitybean
    pool size
    and cache size. Since calls from multiple clients to the same
    entity
    bean
    are
    serialized what is the benefit of having multiple instances in
    an
    entity
    bean
    pool?
    Thanks,
    Stefan

  • Programatic determination of realtime statless session bean pool characteristics

    Is there any way to determine the pool characteristics for a specific
    stateless session bean, i.e. number of free beans etc...
    We have an application that needs to ensure that the number of free
    beans in the pool never exceeds a certain limit.

    Kareem Kouddous wrote:
    Is there any way to determine the pool characteristics for a specific
    stateless session bean, i.e. number of free beans etc...In WLS 6.1, this is available through JMX
    >
    We have an application that needs to ensure that the number of free
    beans in the pool never exceeds a certain limit.Set max-beans-in-free-pool to that limit (works in >= 5.1). There was a
    bug in 6.1 that's fixed in 6.1SP2.
    -- Rob

  • Important conceptual question about Application Module, Maximum Pool Size

    Hello everyone,
    We have a critical question about the Application Module default settings (taking the DB connections from a DataSource)
    I know that on the Web it is generally suggested that each request must end with either a commit or rollback when executing PL/SQL blocks "directly" on the DB without the framework BC/ViewObject/Entity service intervention.
    Now, for some reasons, we started to develop our applications with thinking that each Web Session would reference exactly one DB session (opened by any instance taken from the AM pool) for the whole duration of the session, so that the changes made by each Web session to its DB session would never interfere with the changes made by "other" Web Sessions to "other" DB sessions .
    In other words, because of that convincement we often implemented sort of "transactions" that open and close (with either commit or rollback) each DB session not in/after a single HTTP request, but during many HTTP Requests.
    As a concrete example think of this scenario:
    1. the user presses the "Insert" button. An HTTP request is fired. The action listener is executed and ends up with inserting rows in a table via a PL SQL block (not via the ViewObjects API).
    2. no commit or rollback after the above PL/SQL block is done yet.
    3. finally the user presses a "Commit" or "Rollback" button, firing the call to the appropriate AM methos.
    Those three requests consist of what I called "transaction".
    From the documentation it's clear that there is no guarantee that the couple AM istance + DB session is the same during all the requests.
    This means that, during step 2, it's possible that another user might reference the same "pending" AM/DbSession for his needs and "steal" somehow the work done via PL/SQL after step 1. (This happens because sessions taken by the pool are always rolled back by default.)
    Now my question is:
    Suppose we set the "Maximum Pool Size" parameter to very a great number (always inferior to the maximum number of concurrent users):
    Is there any guarantee that all the requests will be isolated in that case?
    I hope the problem is clear.
    Let me know if you want more details.

    Thanks for the answers.
    If I am right, from all your answers about resource avaiability, this means that even supposing the framework is able to always give us the same AM instance back from the AM pool (by following the session-affinity criterias), there is, however, no "connection affinity" with the connections from the DataSource. This means that the "same AM instance" might take the "a new DB connection", if necessary, from the connection pool of the DataSource. If that happens, that could give us the same problems as taking "a new AM instance" (that is, not following session-affinity) from the beginning, since each time an a new connection is taken (either via a new AM instance or via the same AM instance plus a new DB connection), the corresponding DB session is rolle back by default, clearing all the pending transactions we might have performed before with direct PL/SQL calls bypassing the AM services during the life cycle of our application, so that the new HTTP request will have a clean DB session to start to work with.

  • Buffer pool size

    Oracle 9.2.0.4.0
    java 1.4.2
    Hi,
    How can I set the buffer pool size in oracle 9i?
    Thanks
    JN

    DB_CACHE_SIZE
    Parameter type
    Big integer
    Syntax
    DB_CACHE_SIZE = integer [K | M | G]
    Default value
    48 MB, rounded up to the nearest granule size
    Parameter class
    Dynamic: ALTER SYSTEM
    DB_CACHE_SIZE specifies the size of the DEFAULT buffer pool for buffers with the primary block size (the block size defined by the DB_BLOCK_SIZE parameter).
    The value must be at least the size of one granule (smaller values are automatically rounded up to the granule size). A value of zero is illegal because zero is the size of the DEFAULT pool for the standard block size, which is the block size for the SYSTEM tablespace.
    [email protected]
    Joel P�rez

  • ORA-04031 on 10g - should I just adjust my SGA POOL SIZE?

    Has anyone gotten this message frequently:
    ORA-04031: unable to allocate 37536 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","session parame")
    We are a business intelligence application that issues lots of large queries. We just migrated to 10g and we are seeing this every 2-3 days on our testing machine.
    In particular, I am not sure about "sga heap"... I would just set my Shared Pool Size higher - currently 144 MB but will this help here? Thoughts?

    In Oracle 10g a new feature called "automatic memory management" allows the dba to reserve a pool of shared memory that is used to allocate the shared pool, the buffer cache, the java pool and the large pool.
    In general, when the database needs to allocate a large object into the shared pool and cannot find contiguous space available, it will automatically increase the shared pool size using free space from other SGA structure.
    Since the space allocation is automatically managed by Oracle, the probability of getting ora-4031 errors may be greatly reduced. Automatic Memory Management is enabled when the parameter SGA_TARGET is greater than zero and the current setting can be obtained quering the v$sga_dynamic_components view.
    Please refer to the 10g Administration Manual for further reference
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14231/toc.htm

  • 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,
    Jaideep

    If 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

  • Min Pool Size Option?

    Hi Guys
    We have having problems with connection pools remaining in a production environment.
    We have of course checked to make sure that all objects are closed and disposed and all connections close correctly in our dev and test environments.
    In most cases each user only every opens one connect to the database from a ASP.NET application running in IIS 6.0 (.Net Framework 1.1) using Oracle Data Access Components 10.2.0.2.20. These connections appears to remain for days and in the case where multiple connections they appear to slowly close and again leave the single remaining connection open for days.
    Any ideas do we need to set the Min Pool Size to Zero?
    How long should it take to close connections that are not in use?
    Sample code...
    Private Sub btODPConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btODPConnect.Click
    Dim strConn As String
    Dim mConn As New Oracle.DataAccess.Client.OracleConnection
    strConn = "Password=" & txtPassword.Text & ";User ID=" & txtUsername.Text & ";Data Source=" & txtDatabase.Text & ";Min Pool Size=0;"
    mConn = New Oracle.DataAccess.Client.OracleConnection(strConn)
    mConn.Open()
    If mConn.State = ConnectionState.Open Then
    ASPNET_MsgBox("Connection Open!")
    End If
    mConn.Close()
    mConn.Dispose()
    mConn = Nothing
    End Sub
    Thanks in advance P

    What problem are you trying to solve at this point? Simply "why is odp not tracing?" The only suggestions I really have there are
    1) make sure you restart the app after enabling tracing parameters
    2) make sure the directory you've set tracing to is open as far as permissions
    3) make sure you've set tracing in the right registry setting if you have multiple versions of ODP installed
    4) if you're trying to write to c:\ root, try creating and pointing to a different (c:\odptrace for example) directory instead.
    Hope it helps,
    Greg

  • Mdb ejb won't load using steady-pool-size

    I have a message driven bean I'm deploying in an .ear file. The sun-ejb-jar.xml file has the following:
    <sun-ejb-jar>
    <enterprise-beans>
    <unique-id>1</unique-id>
    <ejb>
    <ejb-name>LoggerEJB</ejb-name>
    <jndi-name>com.ecc.utils.LoggerTopic</jndi-name>
    <mdb-connection-factory>
    <jndi-name>com.ecc.utils.JMSTopicConnectionFactory</jndi-name>
    </mdb-connection-factory>
    <bean-pool>
    <steady-pool-size>2</steady-pool-size>
    <resize-quantity>1</resize-quantity>
    <max-pool-size>5</max-pool-size>
    <pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds>
    </bean-pool>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    Yet I see no evidence it is pre-loading my mdb ejbs. I have output statements and logging that would indicated an instance has actually loaded, and I am seeing none of it. So, what magic trick does it take to get the mdb to acutally use it's <steady-pool-size> setting in the descriptor file?
    Also, how can you tell what ejbs and how many instances are loaded? I see nothing in the Console for this. Also, how can you monitor a topic/queue to see if anything is getting sent?
    Tony F

    Does the ext directory have the php_oci8.dll? In the original steps the PHP dir is renamed. In the given php.in the extension_dir looks like it has been updated correctly. Since PHP distributes php_oci8.dll by default I reckon there would be a very good chance that the problem was somewhere else. Since this is an old thread I don't think we'll get much value from speculation.
    -- cj

  • Setting Thread pool size

              Hi,
              I want to know if I set a system property "-Dweblogic.ThreadPoolSize", how will the
              WLS get to know that the pool size has been changed, at run time?
              E.g. I pass -Dweblogic.ThreadPoolSize=30 from the command-line. Then if I change
              the pool size to 40 at runtime, is there any event that I can fire for the change
              in property through APIs?
              Thnx in advance.
              Best Regards
              Ali
              

    Disregarding what it is for, in my experience, tuning this setting rarely has much effect. For 6.1, the main thread pool related tunables to look at are the EJB thread pools and EJB max-beans... settings, the "default" thread pool, and the internal thread-pool for stand-alone clients -- all of which are mentioned in the performance guide.

Maybe you are looking for

  • How to make sure that Safari opens in Full Screen

    When I open Safari in Mountain Lion it does not open in Full Screen.  I then get it there.  I close it.  I open it.  Does not open in full screen.  How to make it do so?

  • How to set a checkbox to call javascript for calling package procedure?

    Hi folks, I have a report where each row includes a dynamically created checkbox: Step 1: define report in APEX based on this test query select object_id,        txt,        htmldb_item.checkbox           1,           data.object_id,           'oncli

  • Cannot install dreamweaver cs3 design premium on iMac

    I purchased a new iMac and used the migration assistant to migrate everything from another iMac and now I cannot open dreamweaver anymore. I just get a blank error box. Both iMacs are intel based and are running 10.2.7 (latest OS) and I never had any

  • Macbook Pro with XP + Sound drivers, Headphone speaker deactivation?

    I recently discovered that the SigmaTel audio drivers which comes with the BootCamp Beta don't deactivate the built in speakers when headphones are plugged in. Using the apple supplied drivers, sound works fine in XP games. But it obviously isn't a g

  • Download trouble Mac OS X 10 6 8

    I can not download anything. This just started,the blue arrow zooms and is on when I try to open it says download failed. I may have done something to cause this. HELP