MDB - bean pool property.

Hi
We need to see at that any instance of time there should min of 5 MDB instances ready and listening to a external JMS Tibco queue.
We tried to set max-instances="10" min-instances="5" for the message driven bean deployment in orion-ejb-jar.xml - but still seems to instiate only one activeBean.
<message-driven-deployment
name="MessageDrivenEJB1"
resource-adapter="TibcoJMSRAInstanceName">
<resource-ref-mapping name = "jms/queueConnectionFactory" location = "TibcoJMSRASubcontext/MyQCF"
max-instances="10" min-instances="5"/> <!-- don't misspell this or you'll get an RP CF which doesn't work -->
<config-property>
<config-property-name>ConnectionFactoryJndiName</config-property-name>
<config-property-value>TibcoJMSRASubcontext/MyQCF</config-property-value>
</config-property>
<config-property>
<config-property-name>DestinationName</config-property-name>
<config-property-value>TibcoJMSRASubcontext/MyCCQ</config-property-value>
</config-property>
<config-property>
<config-property-name>DestinationType</config-property-name>
<config-property-value>javax.jms.Queue</config-property-value>
</config-property>
<config-property>
<config-property-name>ListenerThreadMaxPollInterval</config-property-name>
<config-property-value>250</config-property-value>
</config-property>
</message-driven-deployment>
Verified - EM console "System MBean Browser" - OC4J>J2EE Server>J2EE Application>EJB Module>MessageDriven Bean> MessageDrivenEJB1
activeInstances is set as 0 (ReadOnly)
activeInstancesHighWaterMark is set to 1 (ReadOnly)
How do we get see that there are always 5 minmum instances ready.
We are connecting to Tibco queue using ra.xml, oc4j-ra.xml (resource adapters) - looking up queues using FileSystemContext - com.sun.jndi.fscontext.RefFSContextFactory
Using - Oracle Enterprise Manager 10g Application Server Control     10.1.3.3.0
Any help/pointers in this regard will be of great help.
Thanks
sunder

Ashar,
          This is expected behavior. Messages are pushed to asynchronous consumers in batches, where the maximum backlog is configurable on the consumer's connection factory via the "MessagesMaximum" setting. If you pushed more than 10 messages at a time, you would start to see the load balance out.
          So, to reduce the backlog, create a custom connection factory with
          - "MessagesMaximum" set to its minimum
          - user and XA transactions enabled (to support transactions)
          - acknowledge policy set to "previous" (needed if the connection factory is ever used for non-transactionally topic drive MDBs)
          And then modify the MDB's WL descriptor file to refer to the JNDI name of this connection factory.
          You can find a nice summary ofMDB descriptor attributes in the 8.1 docs (these docs still apply to 7.0).
          I'm fairly sure that in 7.0 even with MessagesMaximum set to its minimum, there still can be a backlog of one message. If this is a problem, you might try contacting customer support - they may have a solution for this...
          Tom

Similar Messages

  • 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

  • Weblogic 10.3.0 : Loosing a stateless session bean in the bean pool

    Hi,
    We have a strange situation where we loose a Stateless SessionBean in a Bean Pool in Weblogic 10.3.0 Since we only have one bean in the pool, this effectively hangs all incoming calls. We do not want more than one instance in the pool because of application restrictions.
    In the Weblogic admin console, we can see that there are 1 instance in the bean pool, 0 beans in use and 1 waiting incoming request.
    The question is, what can have caused the system to not send the request to the one obviously free bean instance?
    This happens after several hours and over 100000 incoming requests, and the same scenario worked fine in the old weblogic 8 environment.
    We get the following stacktrace:
    <code>
    "[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'" waiting for lock java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@b0d484 TIMED_WAITING
    sun.misc.Unsafe.park(Native Method)
    java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2054)
    weblogic.ejb.container.pool. StatelessSessionPool.waitForBean (StatelessSessionPool.java:269)
    weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:111)
    weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:148)
    weblogic.ejb.container.internal.BaseRemoteObject.preInvoke(BaseRemoteObject.java:227)
    weblogic.ejb.container.internal.StatelessRemoteObject.preInvoke(StatelessRemoteObject.java:52)
    com.mycompany.beans.MessageLogFacace_n73y0z_EOImpl.isMyStuffValid(MessageLogFacace_n73y0z_EOImpl.java:261)
    com.mycompany.beans.MessageLogFacace_n73y0z_EOImpl_WLSkel.invoke(Unknown Source)
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    weblogic.security.service.SecurityManager.runAs(Unknown Source)
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    </code>
    Any help would be very welcome.
    Regards
    Christer

    This is fixed now. Someone had defined a Servlet for the web service in web.xml that was preventing the EJB container to kick in.
    Edited by: user572625 on Aug 25, 2011 11:54 PM

  • How to get bean's property value ?

    Hi all,
    Hi I'm using JSF 1.2
    How can I get and set session bean's property value in request bean action method ?

    Inject the session scoped bean as managed property of the request scoped bean. You can do this in faces-config.xml as outlined here.

  • 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

  • Persists Connection Pool Property ?

    Hi All,
    what is Persists Connection Pool Property ?

    enabling PERSITANCE CONNECTION POOL under CONNECTION POOL in RPD is used by Marketing cache and to resolve [nQSError: 42029] Subquery contains too many values for the IN predicate.
    By enabling above, BIServer Stores a nonfunction subquery in a temporary table and then rewrites the original subquery result against this table. This Reduces data movement between the Oracle BI Server and the database and supports unlimited IN list values and might result in improved performance.
    NOTE: In these situations, the user issuing the logical SQL needs to have been granted the Populate privilege on the target database.
    Sarath G

  • Documentation on Session Bean Pooling in Oracle9iAS

    Is there any documentation stating how the Oracle9iAS (OC4J) handles session bean pooling?

    In orion-ejb-jar.xml you can set the pool size for session beans with
    <session-deployment ... min-instances="2" max-instances="20">
    </session-deployment>
    For complete documentation on configuring pool size follow this link:
    http://download-uk.oracle.com/docs/cd/B25221_03/web.1013/b14428/usadmin.htm#i1017802

  • 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");

  • Strange MDB behaviour:  All MDBs in pool consuming a single message.

    Greetings,
    I'm noticing rather bizzarre behaviour with an MDB. The MDB in question does nothing
    more than consume a message, to a tiny bit of processing, and sends to another JMS
    queue.
    I set the max pool size to 2, initial pool size to 2. I then put a single JMS message
    onto the queue that the MDB is bound to. This is where the problem starts. Both
    MDBs in the pool consume the said message (and I end up with two messages in my outbound
    queue). I have confirmed that indeed only one message is placed on the queue the
    MDBs are bound to. If I set the pool sizes to larger values, all the MDBs in the
    pool still end up consuming that one message.
    Any ideas?
    -Matt.
    P.S. Crossposting to .ejb.ejb20

    I'm not sure what the problem can be, but check that:
    1- you're really using a queue and not a topic.
    2- your transaction didn't roll back. Catch any throwables in onMessage() to
    make sure.
    Does this fix it?
    Emmanuel
    "Matthew" <[email protected]> wrote in message
    news:3cd7fb5c$[email protected]..
    >
    Greetings,
    I'm noticing rather bizzarre behaviour with an MDB. The MDB in questiondoes nothing
    more than consume a message, to a tiny bit of processing, and sends toanother JMS
    queue.
    I set the max pool size to 2, initial pool size to 2. I then put a singleJMS message
    onto the queue that the MDB is bound to. This is where the problemstarts. Both
    MDBs in the pool consume the said message (and I end up with two messagesin my outbound
    queue). I have confirmed that indeed only one message is placed on thequeue the
    MDBs are bound to. If I set the pool sizes to larger values, all the MDBsin the
    pool still end up consuming that one message.
    Any ideas?
    -Matt.
    P.S. Crossposting to .ejb.ejb20

  • Starvation in EJB/MDB thread pool ?

    I am re-posting this article including the acronym EJB in the subject so that the EJB experts don't overlook this question. This question was moved from the JMS newsgroup to this newsgroup by a BEA moderator.
    Our application receives 10 different types of messages on one queue each. Thus we have 10 queues (MQ as a Foreign JMS provider with MDBs in a WLS). We have MDBs processing each of these queues. The producer (mainframe) that sends messages to these queues operates in batch mode.
    Option (1) Configure all MDBs in the same custom thread pool. If a blast of 500 messages arrives on one of the queues and all the threads start consuming messages, what happens to new messages that arrive on other queues ? Do they have to wait until these 500 messages are processed ? I would like someone from the BEA JMS implementation team to comment on this.
    Option (2) Configure smaller custom thread pools - one for each queue. Solves the problem above. Let us say we allocate 2 threads per MDB in custom thread pools. This ensures that none of the queues starve, however, if there is a practical limit on the maximum number of threads that can be configured, then this option introduces an inefficiency. What if there are 200 messages in one queue and zero messages in all others ? We are allowing only two threads to process those 200 messages while the other threads just sit and watch.

    I am re-posting this article including the acronym EJB in the subject so that the EJB experts don't overlook this question. This question was moved from the JMS newsgroup to this newsgroup by a BEA moderator.
    Our application receives 10 different types of messages on one queue each. Thus we have 10 queues (MQ as a Foreign JMS provider with MDBs in a WLS). We have MDBs processing each of these queues. The producer (mainframe) that sends messages to these queues operates in batch mode.
    Option (1) Configure all MDBs in the same custom thread pool. If a blast of 500 messages arrives on one of the queues and all the threads start consuming messages, what happens to new messages that arrive on other queues ? Do they have to wait until these 500 messages are processed ? I would like someone from the BEA JMS implementation team to comment on this.
    Option (2) Configure smaller custom thread pools - one for each queue. Solves the problem above. Let us say we allocate 2 threads per MDB in custom thread pools. This ensures that none of the queues starve, however, if there is a practical limit on the maximum number of threads that can be configured, then this option introduces an inefficiency. What if there are 200 messages in one queue and zero messages in all others ? We are allowing only two threads to process those 200 messages while the other threads just sit and watch.

  • Wiring managed beans - managed-property not updated.

    I have a search page with a text field for entering a substring search.
    Upon clicking submit, a list will be displayed below based on the given substring.
    I wired two managed beans together: one was a substring of type String,
    the other a facade that has a getSubstring and setSubstring method.
    The Facade also has a getList method that returns a list.
    Session:<h:outputText value="#{substring}"/>
    List: <h:outputText value="#{Facade.list}"/>
    What happens is that the session variable is being updated everytime I submit the form
    but the list is the one that was displayed the very first time the form was submitted.
    Subsequent changes to the substring has no effect on the list.
    I tried this because I read somewhere that this is an alternative to putting the
    properties of the form together with the facade.
    However, upon reading the documentation of the struts-config,xml,
    The managed-property will only be set at the creation of the managed bean.
    and not everytime the tag referencing the bean is evaluated.
    Any workaround to making this work?
    Given the scenario above, what is the best design for it?
    I'm thinking of putting an action field in the commandButton
    and then set the list as a session variable,
    which will be accessed by the jsp after the action forwards to the page.
    Is this strategy any good?

    Sure... here it is...
    <faces-config>
    <managed-bean>
    <managed-bean-name>substring</managed-bean-name>
    <managed-bean-class>java.lang.String</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>Facade</managed-bean-name>
    <managed-bean-class>com.Facade</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
         <property-name>substring</property-name>
         <value>#{substring}</value>
    </managed-property>
    </managed-bean>
    </faces-config>
    public class GroupingFacade {
         private String substring;
         public void setSubstring(String substring;
              this.substring=substring;
         public String getSubstring(){
              return substring;
         public List getList(){
              ArrayList list=new ArrayList();
              //Get list from DAO
              //DAO.getList(substring);
              return list;
    }

  • 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

  • Session Bean Pooling

    Hi this is Prashanth
    Is there any way in which we can modify the Number of Beans that are in the pooled state. so that we can visualise the ejbActivate and ejbPassivate method calls when made by the Container.
    thanks in advance

    In orion-ejb-jar.xml you can set the pool size for session beans with
    <session-deployment ... min-instances="2" max-instances="20">
    </session-deployment>
    For complete documentation on configuring pool size follow this link:
    http://download-uk.oracle.com/docs/cd/B25221_03/web.1013/b14428/usadmin.htm#i1017802

  • 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

  • Clearing up a backing bean's property values.

    Hi All
    I saw a few similar posts from the past on this forum similar to my issue but couldnt make much sense of them. Therefore appologies for any repetition :)
    I have search jsp/jsf page. And have one session scope backing bean associated with it. There is a cancel/Back button on the jsp page that takes the current user back to the previous page.
    The problem is that if the user entered some search criteria in the UI components that criteria is retained in my backing bean when the user revists the page. I want my bean's properties to be cleared up once the user leaves the page.
    I would prefer not to set the scope of my backing bean to request.
    One solution i can think of is to set all the properties to null before leaving the page. (I have not tried it yet as I am actually posting from home after coming back from work :) )
    Could you guys advise any more elegant solutions that could possibly solve this issue?
    many thanks

    Set the beans propertie values to null in the constructor [If it is in pagecode]
    and in the jsp use binding
    Like for example:in the constructor of the pagecode
    public Some(){
    if((getFacesContext().getExternalContext().getRequestParameterMap().isEmpty()) || (getFacesContext().getExternalContext().getRequestParameterMap().containsKey("parkPlanFrm:prePlanName"))){
    ValueBinding vb = getFacesContext().getApplication().createValueBinding("#{bean}");
    Bean pcBean = new Bean()
    pcBean = (Bean)vb.getValue(getFacesContext());
    pcBean.getParkPlanCountyMenu().setSubmittedValue("select");
    pcBean.getParkPlanCountyMenu().setValue(null);
    vb.setValue(getFacesContext(), pcBean);               
    IN THE JSP:
    <h:inputText id="parkPlanPpn" styleClass="inputText" maxlength="15" size="15"
    value="#{bean.prePlanNumber}" binding="#{bean.parkPlanPpn}" size="15">
    </h:inputText>
    Here *value="#{bean.prePlanNumber}"* is from the Managed Bean
    *binding="#{bean.parkPlanPpn}"* is from PageCode
    Ravi

Maybe you are looking for