Optimum number of beans

Hi all,
1. What is the optimum number of session beans(stateless/statefull) to have in an enterprise application. Whats the basis on which we got to divide a large ejb into two. Is it ok to keep a number of small ejbs or a single BIG ejb to cater to all the method calls.
2. Whats the criteria in which we got to decide the session management. When one usually go for a stateful session bean and when we have to resort to manage the session in http(session object in servlet) itself.whats the trade off.
Pl gimme some resources in the net which deals with the above problems, or whatever docs u r having.
Thanks and Regards,
S Somu

What is the optimum number of session beans(stateless/statefull) to have in an enterprise application
There is no "absolute" answer to that question. It depends so much on your environment, your architecture, your app that it is impossible to answer to that question.
Is it ok to keep a number of small ejbs or a single BIG ejb to cater to all the method calls.
You can ask this to 10 persons and have 10 different answers. The only thing I can tell you is to avoid "Godlike" session beans that provide everything. I think you should think in terms of functionalities. Each ejb should be a coherent set of methods, regardless of its size. If it creates problems afterwards, it is quite easy to split or group methods in new components.
When one usually go for a stateful session bean and when we have to resort to manage the session in http(session object in servlet) itself.
The rule of thumb about is stateful session beans is : "don't". Have a look to this thread :
http://forum.java.sun.com/thread.jsp?forum=92&thread=436504
Pl gimme some resources in the net which deals with the above problems, or whatever docs u r having.
I'll try and find out if I've something about this on the net. Maybe on "The server side"...
/Stephane

Similar Messages

  • Optimum number of images per sheet for contact sheet?

    what is the optimum number of images per sheet (like 5x5, 10x10 etc) for a contact sheet on the latest photoshop. optimum meaning the largest number of images per page so that you can still see what the image is of and the image number.
    thanks

    How are you going to use the Contact Sheet?  If you are not printing, but using your screen or website, you can use your file browser to simulate the Contact Sheet.  In Windows > File Explorer, choose large icons, and zoom in or out with Ctrl Mouse Wheel.

  • Optimum number of Server nodes for CC

    Hi Guys
    Just wanted to know what is the optimum number of server nodes for Compliance Calibrator?
    By server nodes I mean the ability of CC to process jobs parallelly
    Parveen

    Hi..
    By default you should see 3 bg job threads and 5 web services threads per server node.
    Refer the note:1121978
    In Risk Analysis and Remediation Configuration > Performance Tuning
    Regards
    Gangadhar

  • Optimum number of people on one call?? Poor sound...

    We have monthly meetings with at least 9 people and have been using Skype for the past two years.  The quality of sound has got poorer with voices dragging, people dropping out, and echo.
    Is there an optimum number of people for these Skype meetings?  Can you improve on sound quality? 
    Linda

    On 13 Nov 2006 in macromedia.dreamweaver, Penn1969 wrote:
    > I have noticed that on quite a few PHP programmes it
    tells you how
    > many people are online. Is there any program out there
    that you can
    > add to a normal website that will give you this
    facility?
    Hyper Text Transport Protocol (HTTP) is a stateless protocol,
    which is to
    say that nobody is ever 'connected' for longer than it takes
    to retrieve
    the files that make up the page. You can fake a 'login' by
    establishing
    a session. That is, the server leaves information on your
    browser (a
    cookie) which identifies information that it keeps (the
    session). It
    would be possible to take a count of (Number of sessions
    established and
    not expired), but anything which proports to tell you that
    "19 people are
    viewing this thread" are basically lying. You could as easily
    generate a
    random number and be correct.
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/email.php

  • EJB 3.0 Stateful - Limiting number of bean instances

    Hello EJB Experts,
    I have just started to learn EJB 3.0 and have some basic queries. The application server that I am using is Glassfish. Please find my queries below:
    1. To remove an bean instance from the container, we can use the annotation '@Remove'. I basically had 2 methods and annotated the 2nd method with '@Remove'. Whenever the 2nd method is called, the container is removing this instance also in my program. My problem is that, i might get some invalid parameter values in the 2nd method, so in that case I have to just log the error message and whenever the input parameters are correct, then only the instance should be removed. But lets say, if someone calls my 2nd method with invalid parameters, I log the message and the container removes it, but after some time if the 2nd method is called with correct parameters, then the instance will not be available. Can we programatically tell the container when to remove a bean instance?
    2. From the docs, I am clear that pooling works only for 'Stateless' beans. I however (I am using 'Statuful' bean), wanted to limit the max number of instance to 2. I did below mentioned configuration in the 'sun-ejb-jar.xml' file:
    <bean-cache>
                        <is-cache-overflow-allowed>false</is-cache-overflow-allowed>
                        <cache-idle-timeout-in-seconds>1</cache-idle-timeout-in-seconds>
                        <max-cache-size>2</max-cache-size>
                        <resize-quantity>0</resize-quantity>
                        <removal-timeout-in-seconds>2</removal-timeout-in-seconds>
                        <victim-selection-policy>LRU</victim-selection-policy>
              </bean-cache>
    But i think, it is still creating more that 2 instances of this bean.
    Please help me in getting answers to these questions. I will be very thankful for your replies.
    Regards,
    San
    Edited by: SolarisUser1 on Jun 27, 2010 11:00 PM

    @Remove is used for stateful EJBs and you call it when your client has finished using that instance of the stateful EJB.
    If you are passing in parameters to the method and letting it do some work with your parameters then perhaps it should not be a remove method at all. Make it a normal method and only put cleanup related logic in the remove method. You can also throw some application exception and rollback if the parameters are not correct.

  • Optimum number of threads

    Logically speaking or theoretically on a single core machine, no matter how many threads you create they would rather execute sequentially. So as you increase the no of CPUs that would be the optimum no of threads as well. However I wanted to check with you as to what do you think about the optimum no of threads. For a 4 core box should one have more than 4 threads for a particular application to improve its performance or would it be uselss.
    Also are there any tools available to calculate the optimum no of threads to be used over a machine?

    jverd wrote:
    jschell wrote:
    jverd wrote:
    jschell wrote:
    That probably only leaves about 10 apps in the world where the question matters. There are only 10 CPU-bound apps in the world?Pretty sure there was more to my response than that one line.You mean the part about requirements being more important, etc.? And design. And that none of the threads use any IO.
    That doesn't change the facts that a) Adjusting the number of threads based on the number of CPUs can still have a significant impact on performance and b) The other parts of your response don't change my perception that you're saying there are only 10 CPU-bound apps in the world.
    Which in my applications would start at the design and probably architecture level. And in my applications there is almost always IO in the threads. And for those threads do not I have never tracked a performance problem to those.
    How many thread based apps have you worked on where there was no IO in any of the threads?
    Which part of the rest of it was unclear to you?The part I quoted. Where "rest of" would include the part that you didn't quote.
    Unless you're talking about a different question than, "How many threads should I use for a CPU-bound process, based on the number of CPUs I have?" you seem to be saying precisely that there are only 10 apps in the world where the optimal number of threads is related to the number of CPUs.
    Apps in which the threads have no IO. Apps in which the requirements and design are correct and optimal.
    If that's not what you're saying, perhaps you could clarify which question it is that is only relevant to 10 apps in the world?The ones with no IO in the threads. The ones where the requirements and design are correct and optimal. Just as I said in the reply that you first quoted.

  • 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

  • MR11 - What is the optimum number of entries to be processed in one run?

    A client has been live for some time now but has never run MR11 to clear Goods Receipt entries without Invoice. They are nearing year-end and have to clear all those entries as fast as possible. Problem is MR11 keeps timing out after running for several hours, despite increasing the time limit. Has anyone run MR11 to process mass postings. If so, what is the highest number of entries?

    Hello ,
             To get rid of this error, one possibility is the system parameter rdisp / max_wprun_time increase. Also some suggestions to improve the perfomance can be found in the
    following SAP Notes :
    200021  MR11 Performance - long
    330080  MR11 Performance
    300888  MR11 Performance
    I hope this will solve the timeout error you face.
    Regards ,
    Jerin Ipe John .

  • Optimum number of TMS

    1 How do I figure out the best number of TMS for a service
    group? When do I have to start configuring this number?
    2 Is there any way to automatically increase or decrease the
    number of active TMS, like "-p a,b:x,y" option for CLOPT?
    Any suggestion is welcome.Thank you in advance.

    1 How do I figure out the best number of TMS for a service
    group? When do I have to start configuring this number?
    2 Is there any way to automatically increase or decrease the
    number of active TMS, like "-p a,b:x,y" option for CLOPT?
    Any suggestion is welcome.Thank you in advance.

  • What is the optimum number of CPU cores for Photoshop CC?

    The title is the question.

    To reinforce what Chris has said, keep in mind there's only one processor package in the new Mac Pro.  There are cases where having two packages - such as in the previous design Mac Pro with dual Xeon x5600 series processors - can actually be a pretty big advantage.
    That being said, I've put a lot of thought into how many cores a new Mac Pro ought to be configured with to run graphics software well, and I've come to the thought that 4 is too few and 12 is way too many.  I believe the 3.5 GHz 6 core E5-1650v2 may actually have a slight edge over the 8 core E5-2667v2, because with 12 logical Ivy Bridge processors cranking full-on (with Hyperthreading) the memory bandwidth is actually already going to be taxed.  And of course the 6 core is much cheaper.
    There's a nice little Photoshop benchmark that's reasonably indicative of how well a system actually multithreads with Photoshop.  It can be found here:
    http://ksimonian.com/Blog/2010/02/24/improved-photoshop-benchmark-cpu-speed-test-for-both- mac-pc-free-radial-blur-filter-test/
    I have a PC workstation with the same chipset as the pre-cylinder Mac Pro (dual Xeon x5690s in my case), and my best speed for that benchmark with Photoshop CC equals the best posted on that site:  8.3 seconds.  People are reporting the new Mac Pro is scoring with that benchmark in the same vicinity - but not really faster.
    Do some research yourself and see what various folks with the new cylindrical Mac Pro are scoring on that benchmark.  I'd be interested to hear if your findings are like mine.
    What's your system score, Chris?
    -Noel

  • How to transfer data retrieved from a bean, into requestScope

    I have a jsf page called viewCustomer.jsp, which is backed by a controller/mbean with a name viewCustomerController.
    This page is always called via a request which carries the customer accountID in its request attributes. Hence in order to load the customer details i am using a f:view beforephase call which acts before the render phase. This retrieves a number of beans from of different types. For example, each customer can have an address.
    each addressbean has an ID field which is the primary key to the addresses. If i want to delete the address, i need to send this primary key via a requestAttribute to a controller which will delete it.
    hence to delete the address i have a form such as:-
    <h:form>
    <h:inputHidden value="#{viewCustomerController.customerAddressBean.id}" />
    <h:commandButton value="Delete Address" action="#{viewCustomerController.deleteCustomerAddress}" />
    </h:form>
    The problem with this, is that because the addressbean is only added before the render phase, on presssing the delete address button, i get a null exception, because customerAddressBean doesnt exist yet.
    What i want to do, is that upon pressing the delete address button, the id value should be immediately sent to a requestAttribute called 'addressId', and not back to the backing bean.
    i. e. (if jsf had an assignment operator) it would be something like
    <h:form>
    <h:inputHidden value="requestScope.addressID = #{viewCustomerController.customerAddressBean.id}" />
    <h:commandButton value="Delete Address" action="#{viewCustomerController.deleteCustomerAddress}" />
    </h:form>
    basically, the data should be read from the backing bean, but it shouldnt be written back to the backing bean.
    now i realize that if i allow my database to repopulate the backing bean earlier, the customerAddressBean will be populated, and then the first listing would work. But that would require a second set of trips to the database with no meaning but to repopulate the backing bean which seems like quite a waste.
    In the case of the address, i could populate the propertly with a dummy addressbean, but this would not work in the case of properties which are lists of beans.
    So in summation. How do i transfer data that has been read from a property of a backing bean, into a request attribute on a commandbutton click, without putting the data back into the property of the backing bean.

    Hello Anu,
    There are different hardware options that you have here. The basic things that you need to keep in mind is that the PDA that you purchase runs on Pocket PC and has either a CompactFlash or a PCMCIA slot in it. The driver that you would be using for your LabVIEW PDA application would NI-DAQmx Base Ver 2.0.1. You can refer to its readme for more information on the supported hardware. Also you can check at this page for more information on the supported devices. About your original question, using LabVIEW PDA you can create a text file for storing data and separate the data points with a comma. So that this way you would be able to open the file in Excel if you wanted to. All the file I/O related VIs can be found in the function palette at Programming >> File I/O.
    Regards,
    Chetan K.
    Application Engineer
    National Instruments

  • Rule of thumb for the number of averages in an FFT for vibration analysis?

    I'm doing vibration analysis on rotating machinery and would like to average the FFT to minimize variations of the data (rms averaging).  How does one choose the optimum number of averages? 
    Also, why is it necessary to specify the number of averages (for example, in the Spectral Measurements express VI) as well as telling the VI to restart averaging.  Would not the latter would be sufficient when the Spectral Measurements VI is enclosed in a loop?  Thanks.

    Thanks for your post. 
    In my experience 20 is a good number.  It really depends however on a number of factors. 
    1) does the frequency of the rotation of the machine (speed) change?  If so, averaging from an FFT would not work well.  I would use the Order Spectrum in the Sound and Vibration Measurement Suite if speed changes.
    2) are loads changing (and speed is constant or you are using order spectrum)?  If so you will want a smaller number of averages so you do not average out the effect of fast load changes.
    3) try a few numbers and note when the noise floor appears stable.  This may be the best method to choose the number. 
    4) how often do you want a result?  A smaller number of averages will produce an "averae complete" result more often. 
    Use the averages complete boolean to gate passing on the results (to the user interface, file, further analysis, etc.).  With restart averaging on, it will restart another averaging process and toggle the boolean (gate).
    Hope this helps. 
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Local Beans in a Cluster

    Is it possible to use EJB2.0 Local Interface EJBs in a cluster?
    If so, what happens when clients on two different servers attempt to access the
    same entity bean?

    Even when not using Local Interfaces, Weblogic (by default) will prefer to
    use a co-located bean rather than make an inter-JVM call. Depending on your
    EJB concurrency strategy, you can have a number of bean instances for the
    same EJB data - and the database handles the concurrency. It is usually
    cheaper to instantiate a local instance of the bean than make and inter-JVM
    call (this is especially so when it comes to coordinating transactions and
    the extra network traffic negotiating a 2PC commit). This is the default
    concurrency strategy and the default cluster behaviour for WLS as of 6.0.
    So, the short answer is that it will use a local instantiation of the entity
    bean - and the database will handle the concurrency.
    -Nick
    "David Roytenberg" <[email protected]> wrote in message
    news:[email protected]..
    >
    Is it possible to use EJB2.0 Local Interface EJBs in a cluster?
    If so, what happens when clients on two different servers attempt toaccess the
    same entity bean?

  • Max number of records in MDM workflow

    Hi All
    Need urgent recommendations.
    We have a scenario where we need to launch a workflow upon import of records. The challenge is source file contains 80k records and its always a FULL load( on daily basis) in MDM. Do we have any limitation in MDM workflow for the max number of records? Will there be significant performance issues if we have a workflow with such huge number of records in MDM?
    Please share your inputs.
    Thanks-Ravi

    Hi Ravi,
    Yes it can cause performance overhead and you will also have to optimise MDIS parametrs for this.
    Regarding WF i think normally it is 100 records per WF.I think you can set a particular threshold for records after which the WF will autolaunch.
    It is difficult to say what optimum number of records should be fed in Max Records per WF so I would suggest having a test run of including 100/1000 records per WF.Import Manager guide say there are several performance implications of importing records in a WF,so it is better to try for different ranges.
    Thanks,
    Ravi

  • Max beans in cache

    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.
    Thanks

    Hi,
    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

Maybe you are looking for

  • HT3702 Hi Team,

    Hi team, I was registering my Credit Card, throgh my iPhone 5s, Issue is faced is that while entering the information i was tapping on done, and nothing was happening on the screen, so i though that it is not registered, so i keep on doing this for 7

  • How to get sound from T500 to HDTV?

    Hi Guys, I have a 2 year old T500 which has a displayport. I know I will be able to get the picture to my tv by using a DP-HDMI adapter and the DP port on T500 don't carry sound. But does anyone know how I would get the sound on the TV too? Thanks,

  • 3D effect not working in iOS.

    I'm working on a project where I have some 3D rotation applied to movie clips, both in the timeline and through AS. It works fine, except when exported to the iPad. Is this a known problem, and is there a workaround? Right now the rotating objects go

  • Open a several sessions in the same port 22224

    i want to receave a severel streams from 3 PC in the same port 22224 using a several sessions of this port(22224). it's possible?and how? how i can know the source of the sender of stream (ip adresse for exemple)?. thinks a lot.

  • Star schema for a uploaded data sheet

    Hi All gurus, I am new to this tech . I have a requirement like this , I have to prepare the star schema for this data sheet as below . REPORT_DATE     PREPARED_BY     Units On-time     Units Late     Non-Critical On-time     Non-Critical Lates