EJB performance

I finally deployed an application module as an EJB and connected to a client via applet. Is there some settings I should be aware of because my applet now runs slower than it did in local deployment of the application module. The session takes almost a minute more to publish!!! Is there something I did incorrectly? I even tried to set
-Djbo.maxpoolsize=2000000
-Djbo.initpoolsize= 1000
hoping this would reduce time...but it didnt.... please help
null

I finally deployed an application module as an EJB and connected to a client via applet. Is there some settings I should be aware of because my applet now runs slower than it did in local deployment of the application module. The session takes almost a minute more to publish!!! Is there something I did incorrectly? I even tried to set
-Djbo.maxpoolsize=2000000
-Djbo.initpoolsize= 1000
hoping this would reduce time...but it didnt.... please help
null

Similar Messages

  • Servlets/JDBC vs. servlets/EJB performance comparison/benchmark

    I have a PHB who believes that EJB has no ___performance___ benefit
    against straightforward servlets/JSP/JDBC. Personally, I believe that
    using EJB is more scalable instead of using servlets/JDBC with
    connection pooling.
    However, I am at a lost on how to prove it. There is all the theory, but
    I would appreciate it if anyone has benchmarks or comparison of
    servlets/JSP/JDBC and servlets/JSP/EJB performance, assuming that they
    were tasked to do the same thing ( e.g. performance the same SQL
    statement, on the same set of tables, etc. ).
    Or some guide on how to setup such a benchmark and prove it internally.
    In other words, the PHB needs numbers, showing performance and
    scalability. In particular, I would like this to be in WLS 6.0.
    Any help appreciated.

    First off, whether you use servlets + JDBC or servlets + EJB, you'll
    most likely spend much of your time in the database.
    I would strongly suggest that you avoid the servlets + JDBC
    architecture. If you want to do straight JDBC code, then it's
    preferable to use a stateless session EJB between the presentation layer
    and the persistence layer.
    So, you should definitely consider an architecture where you have:
    servlets/jsp --> stateless session ejb --> JDBC code
    Your servlet / jsp layer handles presentation.
    The stateless session EJB layer abstracts the persistence layer and
    handles transaction demarcation.
    Modularity is important here. There's no reason that your presentation
    layer should be concerned with your persistence logic. Your application
    might be re-used or later enhanced with an Entity EJB, or JCA Connector,
    or a JMS queue providing the persistence layer.
    Also, you will usually have web or graphic designers who are modifying
    the web pages. Generally, they should not be exposed to transactions
    and jdbc code.
    We optimize the RMI calls so they are just local method calls. The
    stateless session ejb instances are pooled. You won't see much if any
    performance overhead.
    -- Rob
    jms wrote:
    >
    I have a PHB who believes that EJB has no ___performance___ benefit
    against straightforward servlets/JSP/JDBC. Personally, I believe that
    using EJB is more scalable instead of using servlets/JDBC with
    connection pooling.
    However, I am at a lost on how to prove it. There is all the theory, but
    I would appreciate it if anyone has benchmarks or comparison of
    servlets/JSP/JDBC and servlets/JSP/EJB performance, assuming that they
    were tasked to do the same thing ( e.g. performance the same SQL
    statement, on the same set of tables, etc. ).
    Or some guide on how to setup such a benchmark and prove it internally.
    In other words, the PHB needs numbers, showing performance and
    scalability. In particular, I would like this to be in WLS 6.0.
    Any help appreciated.--
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com

  • EJB Performance Test

    How do i test MY EJB performance from a Desktop client or JSP or Servlet, I don't have any testing tools

    Hi ,
    If u don't have any tool as such , then you can try testing your EJBs from more than one macines at least.
    I think, the real performance of any distributed components won't be really tested unless and until they are tested for many requests. This is specificaly true with the EJB transactions for dead-locks.
    If u don't have any tool , then u can write a program that sends many requests in a loop , for JNDI look-ups .
    Hope this helps .
    -amit

  • Live discussion on "EJB Performance Verification"

    Empirix, the maker of the Bean-test EJB testing tool, is offering a
    free one hour web event presentation called "Enterprise JavaBeans
    Performance Verification". This event will be held this Friday
    November 16th at 2pm EST.
    To register for this web event or learn about about web events being
    offering by Empirix, go to: http://webevents.empirix.com/Q42001/
    Enterprise JavaBeans Performance Verification
    Enterprise Java Beans (EJBs) are the central components in a
    Java-based enterprise architecture solution. They contain the business
    logic for an enterprise system and implement the communication between
    the Web-tier and database tiers. EJBs typically are architected and
    implemented for months before integrating with the Web-tier hardware
    and software. Waiting to verify the scalability of the overall EJB
    design and the efficient implementation until late in the software
    project with a Web test tool is risky and may cause the entire
    software project to fail.
    Due to the important role EJBs play, performance testing of the EJB
    architecture and implementation is critical during the entire design
    cycle, the test cycle, application server tuning, and with any
    hardware and software environment changes. Manual vs. automated EJB
    component verification strategies will be discussed. During the
    presentation, we will show how an example EJB will be scalability
    tested using Bean-test, Empirix's automated EJB component test tool.
    We will show how Bean-test automatically creates a test harness,
    exercises an EJB under load, isolates a scalability problem, and
    confirms an implemented correction to the scalability problem is
    successful.

    Note, there is a replay of this free web event on Monday, December
    10th at 2pm EST for those who could not make it the first time.
    Steve
    [email protected] (Steven Kolak) wrote in message
    Empirix, the maker of the Bean-test EJB testing tool, is offering a
    free one hour web event presentation called "Enterprise JavaBeans
    Performance Verification". This event will be held this Friday
    November 16th at 2pm EST.
    To register for this web event or learn about about web events being
    offering by Empirix, go to: http://webevents.empirix.com/Q42001/
    Enterprise JavaBeans Performance Verification
    Enterprise Java Beans (EJBs) are the central components in a
    Java-based enterprise architecture solution. They contain the business
    logic for an enterprise system and implement the communication between
    the Web-tier and database tiers. EJBs typically are architected and
    implemented for months before integrating with the Web-tier hardware
    and software. Waiting to verify the scalability of the overall EJB
    design and the efficient implementation until late in the software
    project with a Web test tool is risky and may cause the entire
    software project to fail.
    Due to the important role EJBs play, performance testing of the EJB
    architecture and implementation is critical during the entire design
    cycle, the test cycle, application server tuning, and with any
    hardware and software environment changes. Manual vs. automated EJB
    component verification strategies will be discussed. During the
    presentation, we will show how an example EJB will be scalability
    tested using Bean-test, Empirix's automated EJB component test tool.
    We will show how Bean-test automatically creates a test harness,
    exercises an EJB under load, isolates a scalability problem, and
    confirms an implemented correction to the scalability problem is
    successful.

  • EJB to EJB Performance in same container

    I'm very new to this technology so please excuse me if my question is naive.
    Is RMI used between two EJB's that are located within the same container? If so, how significant is the performance overhead to do this?

    WebLogic by default only uses RMI (and thus serialization) when calling from
    one machine to another. You can force RMI to be used on one machine, but
    performance degrades significantly per method invocation (going from direct
    invocation to RMI invocation).
    Most web containers have to use RMI to talk to EJB containers. What I have
    described is a WebLogic-specific optimization that is a big selling point
    for them. Of course it is also the cause of the 5.1 classloader headaches,
    but they have repeatedly said that those will be fixed for the next release.
    Cameron Purdy
    "Scott Czadzeck" <[email protected]> wrote in message
    news:398f5714$[email protected]..
    I'm very new to this technology so please excuse me if my question isnaive.
    >
    Is RMI used between two EJB's that are located within the same container?If so, how significant is the performance overhead to do this?

  • Ejb performance issue

    Hi
    As ejb1.1 makes call on network and not on local , it takes more time and hence less performance.
    In the whole application which we developed , everything is on single box .
    I am using jboss2.1 , is there any setting which could be done in ejb server with which it should start making calls in local and not on network
    regards
    prateek

    JBoss is pretty smart and works out whether to make inter-bean calls via RMI or by reference for you. JBoss is a fast container so if you are finding your code too slow have a look at your design - that's where most of performance improvements can be made.
    Ian.

  • Local EJBs performance

    Hello!
    We have an application that has numerous EJBs - all of them use remote interfaces,
    even though the EJB clients reside within the same JVM. That prompts me to think
    about using local interfaces for these EJBs if that comes with any performance
    improvements. My question is, does Weblogic server (8.1) do any optimization to
    recognize an EJB as located locally, even though it may be a remote call, and
    not serialize and deserialize the objects involved?
    Thanks,
    Krish

    If you want automatic handling of remote ejb calls as local calls without any change
    to the code, then as far as I know you will need to deploy as an ear.
    Deploying as an ear is quite simple given a set of ejbs - just put them all together
    along with an application.xml file by using jar to create [app].ear and you'll
    be all set.
    "Krish" <[email protected]> wrote:
    What if we are not using EAR files for deployment.
    "Padraic Renaghan" <[email protected]> wrote:
    Yes. Deploy all parts of the app (EJB, WAR,...) in a single EAR.
    See http://e-docs.bea.com/wls/docs81/programming/classloading.html
    the section titled
    http://e-docs.bea.com/wls/docs81/programming/classloading.html
    for further details.
    "Krish" <[email protected]> wrote:
    Hello!
    We have an application that has numerous EJBs - all of them use remote
    interfaces,
    even though the EJB clients reside within the same JVM. That prompts
    me to think
    about using local interfaces for these EJBs if that comes with any
    performance
    improvements. My question is, does Weblogic server (8.1) do any optimization
    to
    recognize an EJB as located locally, even though it may be a remotecall,
    and
    not serialize and deserialize the objects involved?
    Thanks,
    Krish

  • EJB Performance Concern

    Hi ALL
    I am designing an application following EJB Command Pattern.
    The Client (Swing Client) gets reference to the command server and passes the command object.
    When execute method is called on this CommandObject, this will in turn call other session beans and gets it work done fills up the CommandObject (which in this case is also a data transfer object) returns to the client.
    Since every time I need to lookup the session beans in commandobject execute method, will it slow down my system. or since the commandobject and other session beans are on the same machine is it ok.
    Do i have to specify something to say that these session beans that my commandobject is accessing is local.
    Please let me know.
    Thanks
    Modha/-

    Hi modha,
    your beans should have both local and remore interfaces and in the source of your command you should lookup the local home interface you need. Where must you specify the JNDI name of local/remote interface? This is a typical doployment time problem and each AS has its vendor specific tool to di it. For instance, weblogic has its builder by which you specify such information and it generates all the ejb-jar.xml, ... files. Why this is a typical doployment time (and not development time) problem? Because a developer could not know that he/she is binding one of his/her beans to a JNDI name already used by onother developer ... here the deployer comes ... In particular, is case of name collision the deployer can use ejb references with JNDI symbolic name.
    bye

  • EJB from stored procedure lookup problem

    We are running a test case with in an EJB deployed to Oracle 8.1.6, accessing it from a Java stored procedure. It works okay if the stored procedure is called a limited number of times from a single client (client is non-Java). However, for performance testing, we are trying to run it several hundred times in sequence to better simulate the eventual production environment. Consistently on the 216th call, it fails with a NamingException from the InitialContext lookup. We can restart the client again and it will fail on the same call.
    Sounds like something memory related to me. Does anyone have any ideas? I'm using standard EJB client code in my stored procedure, instantiating an InitialContext, performing a lookup on the EJB, performing a home interface create, then accessing an EJB method.
    Thinking it might be that my test was too fast for whatever garbage collection is being done on the server, I tried a 2 second delay between invocations--same problem occurs, however. Should I be making a call to remove my EJBs when my stored procedure ends? If so, how would I do that?
    I did try making the handle to my EJB a static variable within the stored procedure and only "creating" the EJB once. That works okay with a single client, but if I run 2 clients simultaneously, 1 will work for awhile and then eventually die trying to call the EJB method--while the other client continues to run successfully.
    I'm stumped. Any insight or guidance will be greatly appreciated. Thanks.

    My DBA bumped up the large_pool_size and java_pool_size settings and the problem went away. I couldn't convince him to bump the settings one at a time, so am not sure which one was at the root of the problem.
    As I looked at the trace logs on the server, I also noticed that we were getting intermittent "peer disconnected socket" messages during the testing. That appears to have gone away with the pool size increases, also--in case that helps out anyone else.

  • EJB or JSP

    Hi, I am trying to develop an application where the task is to search the underlying database tables based on web based user input (multi-user environment) and display the results back. One possible approach I could think of is to have my JSP pages do the connection pooling, database lookup etc. and display the results back to the browser and the other approach is to use EJBs. In the second approach my JSP pages are just clients to the EJBs and EJBs perform the actual business logic and database retrieval. Now my question... Which of the above two appraoches is more feasible? What are the advantages/disadvantages of using one over the other?? Does use of EJBs cause an extra overhead and result in poor performance?? In future we might extend the application for even database updates and inserts. Please let me know your thoughts. Thanks..

    My two cents: If you are trying to code for reuse and maintainability, you follow the MVC (model, view, controller) paradigm and you cleanly separate the layers of applications. In this scheme, the view knows NOTHING about where the data came from to display on the screen. The data access mechanism has no knowledge of HOW the data it supplies is going to be used, etc. The obvious advantage of this is that this loose coupling of layers allows a developer to CHANGE the specifics of one layer without forcing the other layers to change. For instance, if you move data from one database table to another one and you have 40 JSP pages that all use this data, if they each directly access the DB, all pages have to be modified for the change. And if the pages all use a connection pool and the connection pool changes, you still modify all the pages. Instead, if all the pages simply ask some Java object (a simple class, a Session Bean, controller, etc.) to get the data they desire (i.e., "getCustomerAddress(aCust)"), then no matter where the data moves or what connection pool changes occur, none of the JSP pages has to change and be tested again.
    Of course, the tradeoff is performance. There is no free ride. For most business applications today, the main concern is flexibility and rapid change. So the clean separation of layers and coding for maintainability is usually a winner. However, there will always be places in the app where you might have very critical timing/performance issues. So FOR THOSE PLACES, you might want to use alternative methods of accessing and saving data.
    It should not be ALL or NONE. As you architect the application, you decide where the bottlenecks will be, where the most frequent changes are likely to occur in the business logic, and you design accordingly to give the users maximum performance AND adaptability.
    That's my take on it.
    Dave

  • EJB Statistics in the WLS 5.1

    Hi all,
    Am planning to get the values EJB Performance Statistics.
    (A) Number of allocations
    (B) Number of releases
    (C) Max beans in free pool
    (D) Current free pool size
    (E) Max beans in cache
    (F) Current cache size
    (G) Idle timeout (millisecs)
    Can any one of you tell me whether is it possible to retrieve the values from
    the WLS 5.1 API or not.Any suggesstions are greatly appreciated.
    /Bala

    Sorry about that - I just moved from California to North Carolina, so my
    home box will be offline for a while ;-)
    Anyway, you can see a similar example at:
    http://www.jguru.com/faq/view.jsp?EID=233008
    "Schnaggy" <[email protected]> wrote in message
    news:[email protected]..
    >
    "Dimitri I. Rakitine" <[email protected]> wrote:
    In 5.1 it is tricky (unlike 6.x). Here is an example you can look
    at: http://dima.dhs.org/misc/WLStats.jsp
    Hi Dimitri,
    your site seems to be unavailable, even your email address.
    If you'll be looking at this please write some more information about yourfix.
    Or even send another web site address...
    Many thanx,
    schnaggy:-)--
    Dimitri

  • Urgent: User credentials

    Hello
    This is urgent. I have a simple HTML form page, that passes say a user and password field to another JSP or Servlet (doesnt matter), the JSP or Servlet looks up an EJB which recieves the user and password as arguments. The EJB performs a JDBC connection and returns whether it cosuceeded or failed. This approach works fine as long as a i execute it from a standlaone program, before i incorporate the code into my servlet or JSP, but once i perform the same operation using a JSP or Servlet, it throws an exception
    java.sql.SQLException: User credentials doesn't match existing ones.
    I am clueless as to why this is happening. I am using TOMCAT 3.2.3 as my servlet container.
    Help is needed.

    Not to easy to say. It could have a lot
    of causes. Could you post code?

  • Performance Degradation with EJBs

    I have a small J2EE application that consists of a Session EJB calling 3 Entity EJBs that access the database. It is a simple Order capture application. The 3 Entity beans are called Orders, OrderItems and Inventory.
    A transaction consists of inserting a record into the order table, inserting 5 records into the orderitems table and updating the quantity field in the inventory table for each order item in an order. With this transaction I observe performance degradation as the transactions per second decreases dramatically within 5 minutes of running.
    When I modify the transaction to insert a single record into the orderitems table I do not observe performance degradation. The only difference in this transaction is we go through the for loop 1 time as opposed to 5 times. The code is exactly the same as in the previous case with 5 items per order.
    Therefore I believe the problem is a performance degradation on Entity EJBs that
    get invoked in a loop.
    I am using OC4J 10.1.3.3.
    I am using CMP (Container Managed Persistence) and CMT (Container Managed Transactions). The Entity EJBs were all generated by Oracle JDeveloper.
    EJB version being used is 2.1.

    One thing to consider it downloading and using the Oracle AD4J utility to see if it can help you identify any possible bottlenecks, on the application server or the database.
    AD4J can be used to monitor/profile/trace applications in real time with no instrumentation required on the application. Just install it into the container and go. It can even trace a request from the app server down into the database and show you the situation is down there (it needs a db agent installed to do that).
    Overview:
    http://www.oracle.com/technology/products/oem/pdf/wp_productionappdiagnostics.pdf
    Download:
    http://www.oracle.com/technology/software/products/oem/htdocs/jade.html
    Install/Config Guide:
    http://download.oracle.com/docs/cd/B16240_01/doc/install.102/e11085/toc.htm
    Usage Scenarios:
    http://www.oracle.com/technology/products/oem/pdf/oraclead4j_usagescenarios.pdf

  • Performance degradation with Oracle EJB

    Wonder if someone has done any benchmark on the performance degradation as the number of connection into EJB based application increases. We are experiencing rather severe degradation in one such implementation. Will appreciate if you could share your experience with regard to this.

    Try to see is there any contention on the MTS configuration. Try to increase the number of MTS if the number user is very high

  • I need a clarification : Can I use EJBs instead of helper classes for better performance and less network traffic?

    My application was designed based on MVC Architecture. But I made some changes to HMV base on my requirements. Servlet invoke helper classes, helper class uses EJBs to communicate with the database. Jsps also uses EJBs to backtrack the results.
    I have two EJBs(Stateless), one Servlet, nearly 70 helperclasses, and nearly 800 jsps. Servlet acts as Controler and all database transactions done through EJBs only. Helper classes are having business logic. Based on the request relevant helper classed is invoked by the Servlet, and all database transactions are done through EJBs. Session scope is 'Page' only.
    Now I am planning to use EJBs(for business logic) instead on Helper Classes. But before going to do that I need some clarification regarding Network traffic and for better usage of Container resources.
    Please suggest me which method (is Helper classes or Using EJBs) is perferable
    1) to get better performance and.
    2) for less network traffic
    3) for better container resource utilization
    I thought if I use EJBs, then the network traffic will increase. Because every time it make a remote call to EJBs.
    Please give detailed explanation.
    thank you,
    sudheer

    <i>Please suggest me which method (is Helper classes or Using EJBs) is perferable :
    1) to get better performance</i>
    EJB's have quite a lot of overhead associated with them to support transactions and remoteability. A non-EJB helper class will almost always outperform an EJB. Often considerably. If you plan on making your 70 helper classes EJB's you should expect to see a dramatic decrease in maximum throughput.
    <i>2) for less network traffic</i>
    There should be no difference. Both architectures will probably make the exact same JDBC calls from the RDBMS's perspective. And since the EJB's and JSP's are co-located there won't be any other additional overhead there either. (You are co-locating your JSP's and EJB's, aren't you?)
    <i>3) for better container resource utilization</i>
    Again, the EJB version will consume a lot more container resources.

Maybe you are looking for

  • I am getting error running xml report using bursting

    Hi, +---------------------------------------------------------------------------+ XML Publisher: Version : 12.0.0 Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved. XDOBURSTREP module: XML Publisher Report Bursting Program +----------

  • Question: map the whole source message into one field in the target.

    Hi Friends, Is there a way to populate the whole source message into one of the fields in the target message? I am trying to do this in message mapping. Guide if this could be done in any other way or is there a way to do it in message mapping. Waiti

  • White space/margin around images in onClick popup windows

    Hi. I'm using a JavaScript function that comes with dreamweaver so what when users click on thumbnail images, a larger window pops up with the image. Here's the function: <script type="text/javascript"> <!-- function MM_openBrWindow(theURL,winName,fe

  • Oracle database on ASP model - question

    my orale 8i database is running on sun solaris and the whole front end is an ASP model product. for every customer we have separate schemas and the same set of all database objects are there in every schema. this is going well. my questions is: inste

  • Autoextend without next

    Hello Regarding the autoextend issue, If I specify autoextend on,and omit next clause,by default the datafile will extend 1 block.(not OMF) Consider the datafile is full and segments are extended uniformly or autoallocate. When oracle attempts to ext