J2EE application performance bottlenecks

For anyone interested in learning how to get resolve J2EE application performance bottlenecks, found a great resource:
http://www.cyanea.com/email/throttle_form2.html
registering with them can have you win 1 of 3 iPod mini's

I agree with yawmark's response #1 in one of your evil spams http://forum.java.sun.com/thread.jsp?thread=514026&forum=54&message=2446641

Similar Messages

  • ANN: Learn How to Enhance J2EE Application Performance with ESI

    OTN's newly enhanced Virtual Shopping Mall application illustrates how ESI technology can improve J2EE 1.3 application performance and availability.
    http://otn.oracle.com/sample_code/products/ias/web_cache/index.html
    Cheers,
    -Srikanth

    This solution does not seem to work if it is CDSSO.

  • Java Application Performance Monitoring - J2EE Transaction Monitoring

    Hi,
    Does SCOM 2012 R2 support J2EE transaction monitoring, ie how application behaves from end users. Apdex scores,response time and throughput , Execution method and SQL queries.I could not find transaction monitoring information in Java MP guide.
    Is that Java managment pack supports monitoring only Tomcat and not weblogic,websphere and jboss on Linux servers,
    Appreciate help in this
    Thanks in advance
    Bharath

    Hi Bharath,
    "Apdex scores,response time and throughput , Execution method and SQL queries."
    You're talking about the metrics similar to those which we have after configuring application monitoring in .NET Application Performance Monitoring (AVIcode APM) template, right? If so, this sort of APM profiling for Java apps introduced in SCOM 2012
    R2. But it's only for Tomcat5.5+ hosted Web Applications:
    http://blogs.technet.com/b/random_happy_dev_thoughts/archive/2014/01/07/system-center-2012-management-pack-for-java-application-performance-monitoring-released.aspx
    If you use another application server rather than Tomcat (WebLogic, WebSphere, JBoss), I would recommend you to take a look at BeanSpy instrumentation itself:
    http://www.systemcentercentral.com/demystifying-jee-app-performance-monitoring-in-opsmgr-2012-jee-faqs/
    Download link:
    http://www.microsoft.com/en-us/download/details.aspx?id=29270
    This is not AVIcode-like APM (AVIcode-like APM relies on it as a prerequisite), but if you are familiar with MBeans structure, you could configure quite interesting monitoring transactions for your java apps:
    http://blogs.inframon.com/post/2012/04/27/WebSphere-monitoring-with-the-JEE-Application-Performance-Monitoring-management-packs.aspx
    http://stefanroth.net/2012/04/10/scom-2012-jee-application-availability-monitor-template/
    Igor Savchenko, VIAcode Consulting LLC (http://www.viacode.com/)

  • Performance of J2ee Application running in Portal Server

    Hi,
    We have developed the J2ee Application using JSPDynPage and the performance of this Application is going down day by day.
    It is taking arround 30 sec to load the page.Sometimes I am getting iView Timed out error if the Load is Very high.
    This is all happening in Production server.Can any one please help me to increase the Performance of the Portal.
    Thanks in Advance
    Ajay

    > Thanks for the response.
    >
    > There is no problem in the application as i know the
    > code in this application is perfectly fine.
    >
    > There will be huge load on monday that too between
    > 9-11 AM as too many people will be doing the  the
    > Database transactions at that point of time (adding
    > the data in to the DB extracting huge amount of data
    > from DB) the CPU usage in the porduction server will
    > reach 90 % to 99 % and it will never come down
    > ...this will again come to the normal situation when
    > we restart the portal database.
    >
    > But every monday i cannot restart the server as this
    > is in production.
    >
    > Can anyone please give some tips to increase the
    > performance of the portal.
    Have you checked your Garbage Collector log file ?
    I posted some hints about how to do that in the thread "Server Performance Issue" in this forum.
    I could be that you are running out of memory after the heavy load and then everything will be slow afterwards, because full GC's might be triggered frequently.  
    Regards,
    Markus
    >
    > Thanks
    > Ajay

  • SSO:Portal to J2EE Application

    Hi all,
    I have developed a simple java application that has user-id & password textboxes along with a submit button.(login.jsp)
    this is deployed as an iView in the server.
    When the submit button is clicked,it navigates 2 another JSP page(welcome.jsp) that displays the user's name if the id and passowrd matches with that present in the backend DB.
    I want 2 display this welcome page directly without prompting for a logon frm the user.
    How can i do this with AppIntegrator?I referd the following <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=95024">thread</a>I cant find the system uri,in the source code of the application!
    How should i proceed further?
    Thanks in advance.
    anticipating replies
    SwarnaDeepika

    Hi Swarna,
    Kindly try these steps..I have accumulated the points as per the discussions on mail.
    Just try all these steps..
    1) I hope you have created a J2EE application which has its own data source (i.e: tables in the Data Dictionary which has enteries for user and Password).
    2) Create a HTTP system for usermapping.
    3) After that perform all the steps as mentioned in the WebLog for the <b>App integrator</b>. (i.e: do the user mapping to the system by providing the User name and password.)
    4) In the J2EE Application write the code that If that username which you got from the URL and the userName in your data source is same then show him the main page directly, else show him the Login Page.
    5) Create a URL View in which you can put your application. Set the <b>admin,u</b>ser property from the User Management.
    I hope all these will solve your problem!! Kinldy check this!!
    Regards
    Pravesh

  • JNDI lookup fails in a thread created by J2EE application on WAS 8.0.0.4 running on Red Hat Enterprise Server 5.8(2.6.18-308.e15).

    I am using Jackrabbit Repository (jcr's implementation) as backend in my Web Appl.Whose data persists on Oracle Database. To make connection with Oracle database jackrabbit provide provision of JNDI Lookup to read the data source defined in WAS (using WAS 8.0.0.4 as App Server).
    I am able to perform JNDI Lookup everywhere in my application,But in a flow where i am creating a Thread using Java Concurrent Api and insidethread's call() method when I am trying for JNDI Look following exception occurs –
    [8/20/13 10:57:35:163 IST] 000000dd System Out     O ERROR 20-08 10:57:35,163 (DatabaseFileSystem.java:init:209)            failed to initialize file system
    javax.jcr.RepositoryException: JNDI name not found: java:comp/env/jdbc/ofsds
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:295)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:233)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:166)
    at org.apache.jackrabbit.core.fs.db.DbFileSystem.getDataSource(DbFileSystem.java:226)
    at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
    at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
    at org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
    at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
    at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
    at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
    at com.mmpnc.icm.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:408)
    at com.mmpnc.icm.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:355)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.RepositoryStartupService_$$_javassist_1.newSession(RepositoryStartupService_$$_javassist_1.java)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingSessionManager.create(ICMHouseKeepingSessionManager.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingSessionManager_$$_javassist_8.create(ICMHouseKeepingSessionManager_$$_javassist_8.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2271)
    at org.jboss.seam.Component.getValueToInject(Component.java:2223)
    at org.jboss.seam.Component.injectAttributes(Component.java:1663)
    at org.jboss.seam.Component.inject(Component.java:1481)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingRepository_$$_javassist_7.create(ICMHouseKeepingRepository_$$_javassist_7.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2271)
    at org.jboss.seam.Component.getValueToInject(Component.java:2223)
    at org.jboss.seam.Component.injectAttributes(Component.java:1663)
    at org.jboss.seam.Component.inject(Component.java:1481)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingManager_$$_javassist_6.create(ICMHouseKeepingManager_$$_javassist_6.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstance(Component.java:1899)
    at com.mmpnc.icm.server.concurrent.PerformCloseTask.call(PerformCloseTask.java:136)
    at com.mmpnc.icm.server.concurrent.PerformCloseTask.call(PerformCloseTask.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
    at java.util.concurrent.FutureTask.run(FutureTask.java:149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
    at java.lang.Thread.run(Thread.java:770)
    Caused by:
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component.  This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request.  Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application.  Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
    at com.ibm.ws.naming.java.javaURLContextImpl.throwExceptionIfDefaultJavaNS(javaURLContextImpl.java:522)
    at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:552)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:481)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookupExt(javaURLContextRoot.java:485)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:370)
    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:280)
    ... 114 more
    Caused by:
    javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
    at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1969)
    at com.ibm.ws.naming.ipbase.NameSpace.retrieveBinding(NameSpace.java:1376)
    at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1219)
    at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:1141)
    at com.ibm.ws.naming.urlbase.UrlContextImpl.lookupExt(UrlContextImpl.java:1436)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:477)
    ... 119 more

    Okay "damorgan", you seem to have me confused with a newbie. All I'm posting is the info that I got from my Sys Admin on the fix to my problem I encountered when trying to install Oracle 11g (11.2.0.0) on Red Hat Linux Enterprise 5. Since we're mouting onto an NFS, these are the steps he took. I'm not trying to "hide" information or post as little as possible. What other info do you want? I don't know what you are referring to when you mention "Filer, make, model, software version"? Please elaborate. I was just trying to post to others that may have encountered this problem, and I get somewhat attacked by you. I don't assume anyone can read my mind (especially you).

  • Performance bottleneck with subreports

    I have an SSRS performance bottleneck on my production server that we have diagnosed as being related to the use of subreports.
    Background facts:
    * Our Production and Development servers are identically configured
    * We've tried the basic restart/reboot activities, didn't change anything about the performance.
    * The Development server was "cloned" from the Production server about a month ago, so all application settings (memory usage, logging, etc.) are identical between the two
    * For the bottlenecked report the underlying stored procedure executes in 3 seconds, returning 901 rows, in both environments with the same parameters.  The execution plan is identical between the two servers, and the underlying tables and indexing
    is identical.  Stats run regularly on both servers.
    * In the development environment the report runs in 12 seconds. But on Production the report takes well over a minute to return, ranging from 1:10 up to 1:40.
    * If I point the Development SSRS report to the PROD datasource I get a return time of 14 seconds (the additional two seconds due to the transfer of data over the network).
    * If I point the Production SSRS report to the DEV datasource I get a return time of well over a minute.
    * I have tried deleting the Production report definition and uploading it as new to see if there was a corruption issue, this didn't change the runtimes.
    * Out of the hundreds of Production SSRS reports that we have, the only two that exhibit dramatically different performance between Dev and Prod are the ones that contain subreports.
    * Queries against the ReportServerTempDB also confirm that these two reports are the major contributors to TempDB utilization.
    * We have verified that the ReportServerTempDB is being backed up and shrunk on a regular basis.
    These factors tell me that the issue is not with the database or the SQL.  The tests on the Development server also prove that the reports and subreports are not an issue in themselves - it is possible to get acceptable performance from them in the
    Development environment, or when they are pointed from the Dev reportserver over to the Prod database.
    Based on these details, what should we check on our Prod server to resolve the performance issue with subreports on this particular server?

    Hi GottaLoveSQL,
    According to your description, you want to improve the performance of report with subreports. Right?
    In Reporting Services, the usage of subreport will impact the report performance, because the report server processes each instance of a subreport as a separate report. So the best way is avoid using subreport by using LookUp , MultiLookUp , LookUpSet, which
    will bridge different data sources. In this scenario, we suggest you cache the report with subreport. We can create a cache refresh plan for the report in Report Manager. Please refer to the link below:
    http://technet.microsoft.com/en-us/library/ms155927.aspx
    Reference:
    Report Performance Optimization Tips (Subreports, Drilldown)
    Performance, Snapshots, Caching (Reporting Services)
    Performance Issue in SSRS 2008
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Major performance bottleneck in JSF RI 1.0

    We've been doing some load testing this week, and have come up with what I believe is a major performance bottleneck in the reference implementation.
    Our test suite was conducted two different application servers (JBoss and Oracle) and we found that in both cases response time degraded dramatically when hitting about 25-30 concurrent users.
    On analyzing a thread dump when the application server was in this state we noticed that close to twenty threads were waiting on the same locked resource.
    The resource is the 'descriptors' static field in the javax.faces.component.UIComponentBase class. It is a WeakHashMap. The contention occurs in the getPropertyDescriptors method, which has a large synchronized block.

    Well not the answer I was hoping for. But at least that's clear.
    Jayashri, I'm using JSF RI for an application that will be delivered to testing in august. Can you give advice wether I can expect an update for this bottleneck problem within that timeframe?
    Sincerely,
    Joost de Vries
    ps hi netbug. Saw you at theserverside! :-)

  • Array as Shared Memory - performance bottleneck

    Array as shared memory - performance bottleneck
    Hello,
    currently I work on a multi-threaded application, where many threads work on shared memory.
    I wondering why the application doesn't become faster by using many threads (I have i7 machine).
    Here is an example for initialization in single thread:
              final int arrayLength = (int)1e7;
              final int threadNumber = Runtime.getRuntime().availableProcessors();
              long startTime;
               * init array in single thread
              Integer[] a1 = new Integer[arrayLength];
              startTime = System.currentTimeMillis();
              for(int i=0; i<arrayLength; i++){
                   a1[i] = i;
              System.out.println("single thread=" + (System.currentTimeMillis()-startTime));and here initialization with many threads:
               * init array in many threads
              final Integer[] a3 = new Integer[arrayLength];
              List<Thread> threadList = new ArrayList<Thread>();
              for(int i=0; i<threadNumber; i++){
                   final int iF = i;
                   Thread t = new Thread(new Runnable(){
                        @Override
                        public void run() {
                             int end = (iF+1)*offset;
                             if(iF==(threadNumber-1))
                                  end = a3.length;
                             for(int i=iF*offset; i<end; i++){
                                  a3[i] = i;
                   threadList.add(t);
              startTime = System.currentTimeMillis();
              for(Thread t:threadList)
                   t.start();
              for(Thread t:threadList)
                   t.join();After execution it looks like this:
    single thread=2372
    many threads List=3760I have i7 4GB RAM
    System + Parameters:
    JVM-64bit JDK1.6.0_14
    -Xmx3g
    Why the executing of one thread is faster as executing of many threads?
    As you can see I didn't use any synchronization.
    Maybe I have to configure JVM in some way to gain wished performance (I expected the performance gain on i7 x8 times) ?

    Hello,
    I'm from [happy-guys|http://www.happy-guys.com] , and we developed new sorting-algorithm to sort an array on the multi-core machine.
    But after the algorithm was implemented it was a little-bit slower as standard sorting-algorithm from JDK (Array.sort(...)). After searching for the reason, I created performance tests which shows that the arrays in Java don't allow to access them by many threads at the same time.
    The bad news is: different threads slowdown each-other even if they use different array-objects.
    I believe all array-objects are natively managed by a global manager in JVM, thus this manager builds a global-lock for all threads.
    Only one thread can access any array at the same time!
    I used:
    Software:
    1)Windows Vista 64bit,
    2) java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)
    Hardware:
    Intel(R) Core(TM) i7 CPU 920 @ 2,67GHz 2,79 GHz, 6G RAM
    Test1: initialization of array in a single thread
    Test2: the array initialization in many threads on the single array
    Test3: array initialization in many threads on many arrays
    Results in ms:
    Test1 = 5588
    Test2 = 4976
    Test3 = 5429
    Test1:
    package org.happy.concurrent.sort.forum;
    * simulates the initialization of array in a single thread
    * @author Andreas Hollmann
    public class ArraySingleThread {
         public static void main(String[] args) throws InterruptedException {
              final int arrayLength = (int)2e7;
              long startTime;
                    * init array in single thread
                   Integer[] a1 = new Integer[arrayLength];
                   startTime = System.currentTimeMillis();
                   for(int i=0; i<arrayLength; i++){
                        a1[i] = i;
                   System.out.println("single thread=" + (System.currentTimeMillis()-startTime));
    }Test2:
    package org.happy.concurrent.sort.forum;
    import java.util.ArrayList;
    import java.util.List;
    * simulates the array initialization in many threads on the single array
    * @author Andreas Hollmann
    public class ArrayManyThreads {
         public static void main(String[] args) throws InterruptedException {
              final int arrayLength = (int)2e7;
              final int threadNumber = Runtime.getRuntime().availableProcessors();
              long startTime;
              final int offset = arrayLength/threadNumber;
                    * init array in many threads
                   final Integer[] a = new Integer[arrayLength];
                   List<Thread> threadList = new ArrayList<Thread>();
                   for(int i=0; i<threadNumber; i++){
                        final int iF = i;
                        Thread t = new Thread(new Runnable(){
                             @Override
                             public void run() {
                                  int end = (iF+1)*offset;
                                  if(iF==(threadNumber-1))
                                       end = a.length;
                                  for(int i=iF*offset; i<end; i++){
                                       a[i] = i;
                        threadList.add(t);
                   startTime = System.currentTimeMillis();
                   for(Thread t:threadList)
                        t.start();
                   for(Thread t:threadList)
                        t.join();
                   System.out.println("many threads List=" + (System.currentTimeMillis()-startTime));
    }Test3:
    package org.happy.concurrent.sort.forum;
    import java.util.ArrayList;
    import java.util.List;
    * simulates the array initialization in many threads on many arrays
    * @author Andreas Hollmann
    public class ArrayManyThreadsManyArrays {
         public static void main(String[] args) throws InterruptedException {
              final int arrayLength = (int)2e7;
              final int threadNumber = Runtime.getRuntime().availableProcessors();
              long startTime;
              final int offset = arrayLength/threadNumber;
                    * init many arrays in many threads
                   final ArrayList<Integer[]> list = new ArrayList<Integer[]>();
                   for(int i=0; i<threadNumber; i++){
                        int size = offset;
                        if(i<(threadNumber-1))
                             size = offset + arrayLength%threadNumber;
                        list.add(new Integer[size]);
                   List<Thread> threadList = new ArrayList<Thread>();
                   for(int i=0; i<threadNumber; i++){
                        final int index = i;
                        Thread t = new Thread(new Runnable(){
                             @Override
                             public void run() {
                                  Integer[] a = list.get(index);
                                  int value = index*offset;
                                  for(int i=0; i<a.length; i++){
                                       value++;
                                       a[i] = value;
                        threadList.add(t);
                   startTime = System.currentTimeMillis();
                   for(Thread t:threadList)
                        t.start();
                   for(Thread t:threadList)
                        t.join();
                   System.out.println("many threads - many List=" + (System.currentTimeMillis()-startTime));
    }

  • Does un-checking "Allow Debuging" in VI properties- execution improves overall application performance?

    Does un-checking "Allow Debuging" in VI properties->execution improves overall application performance?

    > Does un-checking "Allow Debuging" in VI properties->execution improves
    > overall application performance?
    Yes, though it is hard to predict by how much. When debugging is
    enabled, after each node on the diagram there will be a small amount of
    compiled code to test if the VI has a probe, a breakpoint, execution
    hiliting, or the pause button is pressed. The code is quite small,
    about two or three instructions, but if you have twenty nodes in a loop
    and the nodes are doing simple math, these instructions could be 25%
    overhead. For more complex nodes or datatypes, these instructions turn
    into a fraction of a percent.
    Turn it off and measure. If you have other performance problems, read
    the documentation on the profiler and use it to help you find yo
    ur
    bottlenecks.
    Greg McKaskle

  • Emails Architecture for big J2EE Applications

    Hi all !
    Need some inputs regarding design of email sending mechanism in huge J2EE applications.
    We are having a medium based application (say 2 lakh subscibers) but may have a increase in
    subsciber base sooner. Its a 3-tier application using Struts (JSP), EJB & Database is Oracle 8i.
    Till now we are using Oracle jobs for submitting emails (asynchronus), it works fine for small subscriber
    base but increase in subscriber base will increase load on database and we want to avoid that.
    Concerned points are :
    1. What architecture is followed in big J2EE applications for sending emails asynchronously ?
    2. How much feasible is using JMS provided with weblogic app server for huge applications ?
    3. Does using messaging queues at app server end will degrade performance considerably ?
    Please see if anyone can help out in this..
    Puneet Gandhi

    I've used JMS + Weblogic (2 quad processor servers in cluster) and JMS in a system that took between 5,000 & 10,000 new users per day. It held up fine.
    I'm not an architect (more of a developer), but I would create a serializable NotificationBean, send it to a MessageBean, and let the MessageBean send the email. Providing your queues are persisting and that you limit the number of MessageBeans to something reasonable, I don't see why you should have performance problems.
    Alternatively if you use MQ I believe it has an email node that you can send messages to. Don't know much about this though.

  • Error while running a J2EE application on Oracle10gAS

    Hi,
    I am receiving an error when trying to run a J2EE application on Oracle10gAS. The application runs successfully on Oracle9iAS, but throws the following exception on 10g application server:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>com.evermind.server.rmi.OrionRemoteException: Error in createInstance(): null; nested exception is: java.lang.NoClassDefFoundError</faultstring>
    <faultactor>/STAR-TicketBroker-context-root/TicketBrokerWS</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Does anyone have any idea why I would be receiving this
    error? We are using Session EJBs in our J2EE application. Are there any changes needed in the code in order to migrate a J2EE application from 9i to 10g ???
    Please help.
    Thanks,
    -Prashant

    Hi Somil,
    I've just had this same error message, and it was because I had a bogus character in my JSP sources.  I'd cut-and-pasted the text from a Word document, and it included the "registered trademark" sign (an R in a circle) as a single character.  This worked in my test environment, but not in my production environment (where presumably the default encoding is different).  I replaced the character with the equivalent HTML entity &amp;reg; (ie. the five characters & r e g ; ) and it all worked.
    Have a look through the offending JSPs and see whether you have any characters that might be incompatible with your default encoding (anything that isn't plain old 7-bit ASCII is potentially a problem).  Change them to HTML entities and you should be fine.
    Hope this helps,
    Richie

  • SSO to J2EE application from SAP Portal

    Hi
    I am trying to do SSO from SAP Portal to a J2EE engine which runs on SAP Web AS.
    Here are my queries
    1. When I deploy a J2EE application on Web AS , I dont get any login screen. How can I make sure that if a user wants to access this J2EE application he should get a login screen and provide his login credentials first, only then would he be able to access the J2EE application.
    2.When I am done with Part 1. If a user tries to access this J2EE application from the Portal (asuming the user Id's in Portal and J2EE application are same and both are in the same domain) , I should not get any login screen and should be able to view the J2EE application.
    3.I want to use SAP Logon tickets generated by the Portal to enable SSO.
    I have done all the necessary configurations in the J2EE server.
    1. Imported the Portal's verify.der certificate.
    2. Adjusted the login modules stack for the application accordingly.
    Can anyone please help me out with this or throw some light.
    Please help.
    Thanks in advance,
    Vivek
    PS - Points will be definitely rewarded

    Hi Vivek,
    Let me give you the solution for both questions differently.
    <b>Ques 1. When I deploy a J2EE application on Web AS , I dont get any login screen. How can I make sure that if a user wants to access this J2EE application he should get a login screen and provide his login credentials first, only then would he be able to access the J2EE application.</b>
    <b>Ans:</b> For doing this in the code of your J2EE application you have to write a if statement which will check if the user ID is coming from the backend or not. If yes then you display that logon page else you just pass that username which is coming from backend and displ;ay the page accordingly.
    <b>Ques 2.When I am done with Part 1. If a user tries to access this J2EE application from the Portal (asuming the user Id's in Portal and J2EE application are same and both are in the same domain) , I should not get any login screen and should be able to view the J2EE application.</b>
    <b>Ans:</b> Yes, this is what I am explaining you. Even I had also made same kind of J2EE application in which if the user is coming from the backend then he/she will look the J2EE screen else if the username is not coming then he will se the Login screen. Exactly same as what are looking for.
    <b>3.I want to use SAP Logon tickets generated by the Portal to enable SSO.</b>
    <b>Ans:</b> I have used User Mapping instead of SAP Logon ticket. Well that is also the option for SSO but personally I think User Mapping is easy and better way for implementing SSO.
    I dont know whether this will help you or not. Please let me know. I can definately help if you want to implement SSO using User Maping.
    Regards
    Pravesh
    PS: Please dont forget to reward points.

  • Unable to connect to the OracleForms application through a J2EE application

    Hi there,
    I have deployed a custom J2EE application in Middleware instance of my Oracle 10g AS 10.1.2
    The application is sso enabled . Once a user logs in the application he is able to see a jsp in which i display hyperlinks for him to access.
    One of these hyperlinks is pointing to the forms application.
    the url is http://psc-pc0592:7778/forms/frmservlet?config=abs_deploy[b]
    Once i click on the URL the forms applet begins to load but as the applet opens up i get the database logon screen.This should not happen
    I am already logged and have been verified by sso.
    Also the forms configuration is associated with a datasource.
    I am not able to get as to why i get that screen when it shoud directly connect to the forms application.
    Any help on this is appreciated.
    Thanks & Regards,
    Madhur Pant

    when you go through your carrier provider, there is an additional step in the SSL tunnel. Not sure how this transcribes, but it is possible that your carrier does not use the same port as the one you want it to use.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • J2EE application access from Portal - P4ObjectBroker

    hey all,
    I want to access access a J2EE application (Web Service) from a Portal Component. The documentation at http://help.sap.com/saphelp_nw04/helpdata/en/c0/a584409db95537e10000000a1550b0/content.htm shows an example.
    They import the package <b>com.sap.engine.services.rmi_p4.P4ObjectBroker</b>. I cannot find the package on my system, i.e. my local portal installation.
    Does anybody know what kind of package is required, or where I can find this package...
    many thanks in advance
    cheers Sascha

    Hey Sascha,
    the P4ObjectBroker is part of the implementation of the P4 Provider Service on the J2EE Engine. It is part of the com.sap.engine.services.rmi_p4 package.
    If you can't find it I recommend you to search it using ClassLocator, it is a plugin that indexes all your packages and locates the propar class for you.
    You can download it at this link: http://sourceforge.net/projects/classlocator
    Read the instructions of how to use it with the NWDS, it is really simple. If you need more help do tell me.
    Regards,
    Roy

Maybe you are looking for