JSF 1.2 performance is not adequate

Sun JSF developers...
JSF 1.2 performance is not adequate.
Here is a simple use case to prove:
Render a table with ~100 columns and ~1000 rows (with facelets)
(you could increase the numbers to stress test)
using h:dataTable tag.
You have to repeat h:column hundred times in XHTML (to create bigger
UI component tree).
Have a backing bean with 100 properties and JSF action which returns
list of 1000 those beans.
In this case there is no DB interaction, no back-end involved.
Have your application set up with Ajax4Jsf (so it goes via its filter). You could
also compare the results with and without it.
Measure RENDER RESPONSE phase, and overall response time.
Compare with JSP which renders same table from same bean.
This is very simple test case to write and you will see that JSF in current state is really slow.
This test could also be used to measure performance of new versions to see where they stand.
It would be also interesting to see how render time grows with increase of
number of columns (number of components in UI tree) (Is it linear or not?)
How fast does it grow with the number of rows (Is it linear growth with increase of data size?)
I believe this type of tests should be standardized before each release.
Does JSF development team perform regular profiling of JSF RI java code?
Running profiling for this use case could also reveal interesting things which
could be improved.
Regards,
--MG                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

But you have done nothing here to determine if itscales linearly or not.
See below.
You increase number of columns (rows) and measure
time.
When you draw on a chart how time grows with increase
in number of columns (rows) you will see if it linear
or not.
I understand how to determine the growth rate; I was merely pointing out that you have only claimed to run one test and one cannot determine the growth rate from that.
It would be also interesting to see how render timegrows with increase of
number of columns (number of components in UI tree)(Is it linear or not?)
How fast does it grow with the number of rows (Isit linear growth with increase of data size?)
Unless you are talking about spreadsheets I doubtthese apps are useful.
They are very useful.I bet they would be more useful as native desktop apps.
>
But this is besides the point; my point is that thescenario of having a large number of components on a
page does not occur often in real applications.
Really? You are not serious?Yes I am serious. I can see we have different perspectives here.
>
A much more common performance scenario is highload.
This is separate story. I'm talking about latency of
loading one page.
Please do not confuse latency and bandwidth.I am not talking about bandwidth but throughput.
>
BTW most of the web sites have small number of
concurrent users,
so the most common scenario is actually exactly
opposite.
Low load but complex pages with lots of components on
them.Again, I can see we have different perspectives here. My experiences are the opposite.
>
So your results will be much more useful if youinclude a load test on a moderately sized page. I'm
not dismissing your original test as invalid or
useless.
My results are more useful than what you are
proposing, as they help to pinpoint the cause of
latency. You could run my test with profiler and
investigate the root cause of it.You do not need to increase the number of components on the page to numbers beyond practice in order to determine this. It is sufficient to run profilers on average pages many times and determine where the most time is spent. In fact, your approach may result in an implementation optimized for pages with a large number of components but not for pages with a lower number of components.
>
My point is that the user experience is not degradedby the performance but by the poor presentation of
information. Many web browsers to not take kindly to
such large tables as well.
With JSF user experience is degraded by performance.I'd like to see your numbers and the code you used.
JSF makes it easier
to do nicer user presentation, but performance
suffers to degree that it is not usable in number of
cases.
JSF inability to generate page fast on server side
has nothing to do with browsers.Correct; but I was talking about pages with large tables in general and why they are a bad idea for web applications. A native application is more appropriate. But this is orthogonal to the purpose of this thread.
>
Again, you are missing the point. Perhaps JSFperformance differs between the application servers.
A fair and useful test will determine that. I'm not
talking about the relative performance vs JSP here.
If JSF does things inefficiently in its code it will
show consistently bad results
across all app servers. Again my test is to detect
and pinpoint JSF inefficiencies and not app servers
ones.
Don't you think JSF developers would want to look for
it first rather than investigating why it perform
badly on some particular app server because of
its internal reasons.I'm approaching this from the perspective of a developer evaluating whether to use JSF and which application server to use. This is very useful from this point of view.
As far as the JSF developers go, as I noted above one does not need to scale out the number of components on the page to determine performance bottlenecks in the implementation. An average case is more appropriate.
Also, if you are going to compare JSF to other technologies you need to try a variety of platforms for both. Some application servers might do JSP better than others. If you limit yourself to one platform you run the risk that it is skewing the comparison one way or another.

Similar Messages

  • Has anyone seen this before,? some import operations were not performed , could not copy the file to requested location

    some import operations were not performed , could not copy the file to requested location , has anyone seen this or have a fix?

    cormacc57361247 wrote:
    has anyone seen this or have a fix?
    Oh, I bet that if you'd done a site search, you'd have got answers to both of those questions...

  • ORACLE ADF 11g /JSF TO  serviet (Service method) not invoking

    Hi,
    ORACLE ADF 11g /JSF TO serviet (Service method) not invoking
    My project name is : ComplProject
    inside the project im having 1 jsp say x.jsp
    work environment : (oracleADF 11g) jdev11 and weblogic server 10.3
    in x.jsp im displaying 1 go link -> when ever we click on GO link it should go to ComplServlet.java
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not working
    i pointed to faces-config.xml also , not working
    i tried to forward like
    FacesContext context = FacesContext.getCurrentInstance();
    ServletContext sContext = (ServletContext)context.getExternalContext().getContext();
    ServletRequest request = (ServletRequest)context.getExternalContext().getRequest();
    System.out.println("third line...............");
    HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
    response.sendRedirect("/servlet/ViewDocument");
    sContext.getRequestDispatcher("/servlet/ViewDocument").include(request, response);
    brief
    (from jsf page) after clicking on GO LINK i need to redirect or control should go to servlet ->service method
    thanks in advance
    regards,
    sandeep

    Hi,
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not workingUse like following.
        public HttpServletRequest getServletRequest() {
            return (HttpServletRequest)facesContext.getExternalContext().getRequest();
        public redirect(String url){
           getServletRequest().sendRedirect(getServletRequest().getContextPath() + "/servlet/ComplServlet");
        }If you are using golink as frank suggested then use it like this.
    <af:goLink text="ComplServlet" destination="/servlet/ComplServlet"/>no need of using context when using goLink,
    Regards,
    Santosh.

  • Performance Analysis Notes

    Hi,
    I want some "Performance Analysis Notes or material"..
    Plz give me some links or send me on my id: [email protected]
    Thanks...

    Hi, this may help you.
    1) Dont use nested select statements
    2) If possible use for all entries in addition
    3) In the where addition make sure you give all the primary key
    4) Use Index for the selection criteria.
    5) You can also use inner joins
    6) You can try to put the data from the first select statement into an Itab and then in order to select the data from the second table use for all entries in.
    7) Use the runtime analysis SE30 and SQL Trace (ST05) to identify the performance and also to identify where the load is heavy, so that you can change the code accordingly
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d0db4c9-0e01-0010-b68f-9b1408d5f234
    ABAP performance depends upon various factors and in devicded in three parts:
    1. Database
    2. ABAP
    3. System
    Run Any program using SE30 (performance analys) to improve performance refer to tips and trics section of SE30, Always remember that ABAP perfirmance is improved when there is least load on Database.
    u can get an interactive grap in SE30 regarding this with a file.
    also if u find runtime of parts of codes then use :
    Switch on RTA Dynamically within ABAP Code
    *To turn runtim analysis on within ABAP code insert the following code
    SET RUN TIME ANALYZER ON.
    *To turn runtim analysis off within ABAP code insert the following code
    SET RUN TIME ANALYZER OFF.
    Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    Avoid for all entries in JOINS
    Try to avoid joins and use FOR ALL ENTRIES.
    Try to restrict the joins to 1 level only ie only for tables
    Avoid using Select *.
    Avoid having multiple Selects from the same table in the same object.
    Try to minimize the number of variables to save memory.
    The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    Avoid creation of index as far as possible
    Avoid operators like <>, > , < & like % in where clause conditions
    Avoid select/select single statements in loops.
    Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
    Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    Avoid using ORDER BY in selects
    Avoid Nested Selects
    Avoid Nested Loops of Internal Tables
    Try to use FIELD SYMBOLS.
    Try to avoid into Corresponding Fields of
    Avoid using Select Distinct, Use DELETE ADJACENT
    Check the following Links
    Re: performance tuning
    Re: Performance tuning of program
    http://www.sapgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    check the below link
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    See the following link if it's any help:
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Check also http://service.sap.com/performance
    and
    books like
    http://www.sap-press.com/product.cfm?account=&product=H951
    http://www.sap-press.com/product.cfm?account=&product=H973
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Performance tuning for Data Selection Statement
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Debugger
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Run Time Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
    SQL trace
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
    CATT - Computer Aided Testing Too
    http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
    Test Workbench
    http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
    Coverage Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
    Runtime Monitor
    http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
    Memory Inspector
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
    ECATT - Extended Computer Aided testing tool.
    http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
    Just refer to these links...
    performance
    Performance
    Performance Guide
    performance issues...
    Performance Tuning
    Performance issues
    performance tuning
    performance tuning
    You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
    1 Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    2 Avoid for all entries in JOINS
    3 Try to avoid joins and use FOR ALL ENTRIES.
    4 Try to restrict the joins to 1 level only ie only for 2 tables
    5 Avoid using Select *.
    6 Avoid having multiple Selects from the same table in the same object.
    7 Try to minimize the number of variables to save memory.
    8 The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    9 Avoid creation of index as far as possible
    10 Avoid operators like <>, > , < & like % in where clause conditions
    11 Avoid select/select single statements in loops.
    12 Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
    13 Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    14 Avoid using ORDER BY in selects
    15 Avoid Nested Selects
    16 Avoid Nested Loops of Internal Tables
    17 Try to use FIELD SYMBOLS.
    18 Try to avoid into Corresponding Fields of
    19 Avoid using Select Distinct, Use DELETE ADJACENT.
    Regards
    Madhu

  • I get an error when attempting to start genius. It says "Unsuccessful Action: The action you attempted to perform did not complete successfully. Please try again later." Help!

    I get an error when attempting to start genius. It says "Unsuccessful Action: The action you attempted to perform did not complete successfully. Please try again later." Help!

    From an existing Discussion:
    Go to Safari --> Preferences
    Click Security
    Show Cookies
    Type "apple.com" in to top search field
    Select All
    Click Remove
    Click Done
    Repeat the above to confirm they are gone (mine took two attempts)
    Choose Update Genius again in iTunes.
    iTunes 9 - can't update genius https://discussions.apple.com/thread/2151150

  • Red-eye Edits are not Adequate

    I have some time on my hands right now so I thought I would start to go through my 13,000 photos and start to group and edit my libraries. I think the last time I did this was with iphoto 4ish.
    But I am finding that the red eye fix is not adequate for this purpose. If the shot is relatively close and the eyes are burning red then the auto red eye works. If this is not the case then going to manual and using zoom does an ok but not good job on 80% of those cases. But many photos are just not fixable. I would get about 5-10% that are not fixable. I seem to remember that the earlier red eye worked much better.
    Are there work arounds to this problem?

    Try selecting the eye and applying a Hue/Saturation adjustment. This can be done via Enhance > Adjust Color > Hue/Saturation or by adding a Hue/Saturation adjustment layer. In the H/S dialog box select in the pull-down list the appropriate color you want to remove, and move the Saturation slider left.

  • Changing sustain CC performance into note length?

    Hello all,
    I was told there is a way to turn a sustain performance into an extended note in Logic.
    If I hold down the sustain pedal and hit a note, release the note, but continue the sustain, Logic can then take the sustain CC and extend the short note I just played into a long note the same length as the sustain?
    I'm being overly descriptive because when it was explained here in the studio, it made sense, but I'm not sure how a description over the message board will do.
    Anyone done this?
    If so, it seems like a great unknown feature, especially for notation.
    dual 2.5 G5   Mac OS X (10.3.8)  

    Hi Mark,
    I do this all the time. It's a fantastic feature. Performing the operation will not only change the note lengths to conform to the actual length of the notes but it will remove the "Ped." and "*" from your data.
    However, there are two caveats I'd offer:
    1. If you have merged two or more tracks which may have overlapping sustain pedal=on markings, the results of which may look like this in the Score Editor:
    Ped. Ped. * Ped. * Ped. * Ped. Ped. *
    _____^_____________________^_____
    Here, the "^" indicate duplicate Ped. markings which will NOT be removed automatically by this process. So if you were to play back a track after you perform the operation, you'll hear what you'll think are hung notes. But really it's a case of these pedal markings not being removed (hence, there is CC#64=127 data which don't have corresponding CC#64=0 to release the pedal). When I hear this, a quick parusal of the track in the Score Editor will always reveal these errant "Ped." marks, and I just delete them.
    2. You may find it necessary to perform a "Remove Overlaps" process after you perform the "Sustain Pedal to Note Length" operation. This way, if in your previously merged tracks you had notes which were allowed to overlap by virtue of the sustain pedal, the Note Off from the first instance of the note will not "choke" the Note On from the second instance of the note.
    So the only downside to using the Sus-->Note Length function is that you can't get multiple instances of the same note to overlap or pile up on one another. While this is desirable for notation purposes, sometimes it will change the sound of the track so I'll revert to the sustain pedal version for listening purposes but use the non-sustain version for notation.
    I have both of these functions assigned to key commands, so my lil' routine is to perform Sus-->Note Length followed immediately by a Remove Overlaps function.
    HTH

  • JSF 2.0 Performance - Build View on postback

    Hi,
    we are currently looking at JSF 2.0 and it seems as if on every postback a buildView is executed instead of a restoreView, as it was the case with JSF 1.2. This unfortunately seems to have quite an impact on performance in regards to memory consumption and runtime. Is there a way to get back to the "old" JSF 1.2 behavior by setting a flag or something similar? Until now, we could not find such an option.
    Thanks and regards,
    Michael

    Set the javax.faces.PARTIAL_STATE_SAVING context init parameter to false.

  • JSF 1.2 - commandbutton does not do anything

    Hello,
    My Problem is, that i want to call the methods addBohr1 and addBohr2 of the artikel bean, but neither of the 2 commandbutton calls the method.
    As well eclipse even offers me to autocomplete the methods in the action field.
    By the way the commandbutton to login (account.login) works...
    Any ideas?
    JSF-Site:
    <f:view>
        <h:form style="margin: 80 px;">
            <h:panelGrid columns="3" border="1"
                style="width: 1000px; border-left-color: Blue; border-top-color: Blue; border-right-color: Blue; border-bottom-color: Blue; border-bottom-width: thin; border-right-width: thin; border-left-width: thin; border-top-width: thin">
                <h:graphicImage id="header_logo" url="images/werkzeug.jpg"
                    style="height: 164px; width: 178px" />
                    <h1 align="center">Startseite</h1>
                <h:panelGroup>
                    <h:panelGrid columns="2" styleClass="borderTable"
                        headerClass="panelHeading" style="width: 156px; height: 149px">
                        <f:facet name="header">
                            <h:outputText value="Anmeldung zum WebShop"
                                style="background-color: #0000A0; color: White" />
                        </f:facet>
                        <h:outputLabel for="Kundennummer" value="Loginname:" />
                        <h:inputText id="Kundennummer" value="#{account.name}"
                            required="true" style="width: 126px" />
                        <h:outputLabel for="Passwort" value="Passwort:" />
                        <h:inputSecret id="Passwort" value="#{account.pass}"
                            required="true" style="width: 125px" />
                        <h:commandButton action="#{account.login}" value="Anmelden"
                            style="color: #FFFFFF; background-color: #0000A0" />
                        <h:outputText value="#{account.eingeloggt}"></h:outputText>
                    </h:panelGrid>
                    <f:verbatim>
                        <a href="persoenlicheDaten.jsf">Registrieren?</a>
                    </f:verbatim>
                </h:panelGroup>
                <h:panelGroup>
              <h:panelGrid columns="2">
                   <h:graphicImage id="side_bar" url="images/bg_blue.png"
                             style="height: 400px; width: 18px" />
                             <h:panelGrid border="0" columns="1" style="width: 68px; height: 200px; color: #FFFFFF; background-color: White;">
                                  <a href="startseite.jsf">Seite1</a>
                                  <a href="startm.jsf">Seite2</a>
                        </h:panelGrid>
              </h:panelGrid>
         </h:panelGroup>
                <h:panelGroup>
                        <h2 align="center" style="height: 43px; width: 666px">Ansicht</h2>
                        <h:panelGrid columns="2" style="width: 703px; height: 386px">
                            <h:panelGrid>
                            <h:outputLabel for="bohr1" value="Test"></h:outputLabel>
                            <h:graphicImage id="bohr1" url="images/Saege/test.jpg"
                                style="width : 199px; height : 140px;" />
                            <h:commandButton action="#{artikel.addBohr1}" value="TEST" style="color: White; background-color: #0000A0"></h:commandButton>
                            </h:panelGrid>
                            <h:panelGrid>
                            <h:outputLabel for="bohr2" value="Test"></h:outputLabel>
                            <h:graphicImage id="bohr2" url="images/Saege/test.jpg"
                                style="height: 140px; width : 199px;" />
                            <h:commandButton action="#{artikel.addBohr2}" value="TEST" style="color: White; background-color: #0000A0"></h:commandButton>
                            </h:panelGrid>
                        </h:panelGrid>
                </h:panelGroup>
                <h:panelGroup>
                    <h:outputText value="Warenkorb" style="color: White; background-color: #0000A0">
                           </h:outputText>
                    <h:panelGrid columns="1" style="width: 180px">
                    <h:outputText value="#{artikel.result}"></h:outputText>
                        <a href="checkout.jsf">Weiter zum Checkout</a>
                    </h:panelGrid>
                </h:panelGroup>
            </h:panelGrid>
        </h:form>
    </f:view>Method of the Bean:
        public String addBohr1() {
            System.out.println("TEST");
            return "access";
        }Faces-Config:
         <managed-bean>
              <managed-bean-name>artikel</managed-bean-name>
              <managed-bean-class>handler.ArtikelHandler</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>Console:
    05.05.2010 20:33:02 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: ...
    05.05.2010 20:33:02 org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    05.05.2010 20:33:02 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 432 ms
    05.05.2010 20:33:02 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    05.05.2010 20:33:02 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
    log4j:WARN No appenders could be found for logger (org.apache.myfaces.webapp.StartupServletContextListener).
    log4j:WARN Please initialize the log4j system properly.
    05.05.2010 20:33:03 org.apache.catalina.core.StandardContext addApplicationListener
    INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
    05.05.2010 20:33:03 org.apache.catalina.core.StandardContext addApplicationListener
    INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
    05.05.2010 20:33:04 org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    05.05.2010 20:33:04 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    05.05.2010 20:33:04 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31  config=null
    05.05.2010 20:33:04 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2285 ms
    05.05.2010 20:33:07 org.apache.catalina.core.ApplicationContext log
    INFO: No state saving method defined, assuming default server state savingSorry for my bad English, but I'm not a native speaker ;)

    Do you have a navigation rule in your faces-config.xml?
    Somehow the applicationserver needs to determine which page to display now....a navigation-rule in faces-config.xml will telle this to applicationserver.

  • Is it possible to use a JSF Validator to perform a Dependency validation?

    I'm new to JSF, but getting more and more experience everyday. I've create some custom validators for a few input fields on my form and they are working beautifully. What I can't figure out is how to write a validator that will check a field for a value based on another fields value. For instance, I would like to require a person to enter an address if they select a Yes / No select box indicating they would like to supply an address.
    Does anyone know how I can do this? I've come up with a clunky work around by performing my dependency validations in my action page rather than a validator.
    Thanks!!!!

    Hi RaymondDeCampo.
    I have never been a big fan of how JSF (and even Struts)handle forms both in the front (the view) and the back.
    Forcing the developer to contend with writing a java class for each thinkable form does not look like a workable pattern to me. And tying the view (JSP or JSF page) tightly to the form classes and validators is also cumbersome.
    In many decent applications, the number of forms grows to more than a tiny handful and so would the number of classes that simply act as dummy data carriers.
    I do not see why I should have to maintain all the accompanying classes and validators and JSP code that each form comes with. Making changes to the structure of a form (say adding new fields or removing others, or even adding whole form pages into the sequence), modifying the model of a form (like renaming fields, adding new validation rules), or changing form view (e.g. switching from a list of checkboxes to a select dropdown, changing how and where error messages are presented, supporting a new language) are just some of those things that become tedious to maintain sentrally.
    No other model of building forms out there makes the named tasks any simpler, aprt from adding a new level of complexity to the simple data collection purpose of web forms. Well, except Formular. I have had Formular working in JSF and Struts although I ended up ditching the JSF way of handling forms altogether.
    I prefer good and solid separation of form components as outlined by Formular. Formular is the only API out that would allow me to migrate my forms from any Java web server to another without having to rewrite a line of code. Try upgrading your Struts form to JSF or vise versa and you'll get the idea of why I dropped the more hardwired way of coding web forms.
    With Formular, I have created a repository of validators (for doing my form checks). datasources (for populating lists, radios, checkboxes, and combos), and styles (for laying out my form elements). Making modifications to my repositories, I can do site-wide changes without touching my JSPs or Java classes. I can move form messages from the top of ALL my forms and place them just above the offending fields in one single style file, I can swap the markers on optional fields and use them only on required fields if the business manager wants to in a single go, I can even change validation rules that are attached to several fields in different web forms at one instance (how many hours did we save when one client wanted all buttons in the site changed to GIFs and all phone and address fields in their application and survey forms validated a little different?)
    Ack! Now It looks like I'm preaching, again so I'll hold myself.

  • Abap Logic for performance tuning not working when using Internal tables

    Hi,
    I wrote this piece of code that is working correctly that is select SUM of cost from DSO where Plant is the same for Sales Items.
    LOOP AT RESULT_PACKAGE INTO rp.
    SELECT SUM( /N/S_STRDCOST ) FROM /N/ADSP_DPIT00 INTO
    rp-/N/S_STRDCOST
    WHERE /N42/S_SALESITEM = rp-/N42/S_ITEMID AND /N42/S_PLPLANT EQ
    rp-/N42/S_SOURCE.
    MODIFY RESULT_PACKAGE FROM rp.
    Clear rp.
    ENDLOOP.
    Now I try to rewrite it for performance tunning using internal table  but I am getting 0 values. can't figure out whats the problem and been struggling fixing it.
    TYPES : begin of ty_DSO_TABLE,
             /N42/S_STRDCOST TYPE /N/ADSP_DSPC00-/N/S_STRDCOST,
             /N42/S_ITEMID TYPE /N/ADSP_DSPC00-/N/S_ITEMID,
           end of ty_DSO_TABLE.
    DATA: it_DSO_TABLE type hashed table of ty_DSO_TABLE with unique key
    /N/S_ITEMID,
         wa_DSO_TABLE type ty_DSO_TABLE.
    Field-symbols:  <rp> TYPE tys_TG_1.
    LOOP AT RESULT_PACKAGE assigning <rp>.
      clear wa_DSO_TABLE.
    Read table IT_DSO_TABLE into wa_DSO_TABLE with table key /N/S_ITEMID
      = <rp>-/N/S_ITEMID.
      if sy-subrc ne 0.
          select SUM( /N/S_STRDCOST )  into CORRESPONDING
          FIELDS OF wa_DSO_TABLE from
          /N/ADSP_DPIT00 WHERE /N/S_SALESITEM =  <rp>-/N/S_ITEMID AND
          /N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
         if sy-subrc eq 0.
              <rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
         endif.
    endif.
    ENDLOOP.
    Any idea whats wrong with the code
    thanks

    Hi Vaidya,
    According to the code which you have written, there is no value in table IT_DSO_TABLE when you are trying to read the values.And after the read statement you have given a condition for sy-subrc. Hence the select statement is actually not even getting executed. *Also you have not assigned the final value back to the ResultPackage.*_
    So Kindly correct your code as follows:
    Data: wa_dso type ty_DSO_TABLE.
    LOOP AT RESULT_PACKAGE assigning <rp>.
    clear wa_DSO_TABLE.
    select SUM( /N/S_STRDCOST ) into CORRESPONDING
    FIELDS OF wa_DSO_TABLE from
    /N/ADSP_DPIT00 WHERE /N/S_SALESITEM = <rp>-/N/S_ITEMID AND
    /N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
    if sy-subrc eq 0.
    <rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
    MODIFY RESULT_PACKAGE FROM <rp>.
    endif.
    ENDLOOP.
    Hope this helps you.
    Regards,
    Satyam

  • 2004s Web report performance is not good ,though that of 3x web is OK.

    Hi,
    I feel 2004s Web report performance is bad, though that of 3x web is no problem (the same query is used.) it is worse than BEx analyzer.
    This query has more than 1,000 records and those queries that have many records result in the same bad performance.
    Of course there are many reason for this bad performance, please tell me your solution by which you solve the same problem like this.
    the SIDs of EP and BI is difference here.
    CPU is not consumed when 2004s web report is executed.
    And I have cancelled  virus scan to this web report...
    Kind regards,
    Masaaki

    It is bad, am sure it's down to the new .net and java based technology.  Aggregates are a way forwards though from what i've heard of the BI Accelerator this is the real way forwards.

  • Grid Control performance tab not available when on the target home of ASM

    I noticed recently that the "Performance" tab/link is not available when you are using 10g Grid Control and you are on the home page of an ASM instance. Can this be explained?

    Hi MarGur
    I try to help you. The OEM Grid Control in some times not discover the Oracle 9i databases and you must to add manually.
    First, check in your target machine that the user owner of agent software have rights of read and write in the ORACLE_HOME directories of Oracle 9i databases.
    Go to Grid Control Console
    Select Targets ---> Databases
    Press Add --> Select the host ebisdb2.oneshield.com and press continue
    The automatic discover process begin. When finished is very normal that nor discover the Oracle 9i databases. You press the Add manually button
    in the page that appear you must entry all the configuration information of database:
    ORACLE_HOME directory
    DBSNMP USER
    DBSNMP PASSWORD
    HOSTNAME
    PORT
    SID
    Check that the dbsnmp user in your database is unlock and press the TEST button to verify the connection work fine.
    After this many windows appear of configuration process, and you will put the sys password and host credentials.
    If you have problems, tell me
    Regards

  • Need Help to see why the performance is not good

    Hi,
    We have an application that all process are developed in PL/SQL on Oracle 9i Database :
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    Why I have created this package. the application is a production management on chemical industries. I need to sometimes trace the Manufacturing order execution to eventually answer some incoherent data. If I analyze directly the data in the Table is not always responding because the origin of problem can be provide of some execution that perform some calculation.
    In the procedure or function a use my package PAC_LOG_ERROR.PUT_LINE(xxxxxx) to save the information. This command save the information in the memory before. At the end of the procedure or function a perform the insert with the COMMIT calling PAC_LOG_ERROR.LOGS or PAC_LOG_ERROR.ERRORS on the catch exception.
    This package is always call. On each routines performed I execute it. In the trace log of the database we have see a problem we the procedure GET_PROC_NAME in the package. We have identify that is called more that 800x and increase the performance. Who increase is this select command :
        SELECT * INTO SOURCE_TEXT
        FROM (SELECT TEXT FROM all_source
            WHERE OWNER = SOURCE_OWNER AND
                  NAME=SOURCE_NAME AND
                  TYPE IN ('PROCEDURE','FUNCTION','PACKAGE BODY') AND
                  LINE <= SOURCE_LINE AND SUBSTR(TRIM(TEXT),1,9) IN ('PROCEDURE','FUNCTION ')
            ORDER BY LINE DESC)
        WHERE ROWNUM = 1;I use it to get the procedure or function name where my log proc is called. I now that I can pass in parameters, but I have think to use an automatic method, that can help to not have some problem with others developer team to make a copy/past and not update the parameters. Because the Log info is read by the Help Desk and if we have an error on the information, it not a good help.
    COULD YOU PLEASE HELP ME TO OPTIMIZE OR SAID THE BETTER METHOD TO DO IT ?
    Here my package :
    create or replace
    PACKAGE PAC_LOG_ERROR AS
    -- Name         : pac_log_error.sql
    -- Author       : Calà Salvatore - 02 July 2010
    -- Description  : Basic Error and Log management.
    -- Usage notes  : To active the Log management execute this statement
    --                UPDATE PARAM_TECHNIC SET PRM_VALUE = 'Y' WHERE PRM_TYPE = 'TRC_LOG';
    --                COMMIT;
    --                To set the period in day before to delete tracability
    --                UPDATE PARAM_TECHNIC SET PRM_VALUE = 60 WHERE PRM_TYPE = 'DEL_TRC_LOG';
    --                COMMIT;
    --                To set the number in day where the ERROR is save before deleted
    --                UPDATE PARAM_TECHNIC SET PRM_VALUE = 60 WHERE PRM_TYPE = 'DEL_TRC_LOG';
    --                COMMIT;
    -- Requirements : Packages PAC_PUBLIC and OWA_UTIL
    -- Revision History
    -- --------+---------------+-------------+--------------------------------------
    -- Version |    Author     |  Date       | Comment
    -- --------+---------------+-------------+--------------------------------------
    -- 1.0.0   | S. Calà       | 02-Jul-2010 | Initial Version
    -- --------+---------------+-------------+--------------------------------------
    --         |               |             |
    -- --------+---------------+-------------+--------------------------------------
      PROCEDURE INITIALIZE;
      PROCEDURE CLEAN;
      PROCEDURE RESETS(IN_SOURCE IN VARCHAR2 DEFAULT NULL);
      PROCEDURE PUT_LINE(TXT IN VARCHAR2);
      PROCEDURE ERRORS(REF_TYPE IN VARCHAR2 DEFAULT 'SITE', REF_VALUE IN VARCHAR2 DEFAULT '99', ERR_CODE IN NUMBER DEFAULT SQLCODE, ERR_MSG IN VARCHAR2 DEFAULT SQLERRM);
      PROCEDURE LOGS(REF_TYPE IN VARCHAR2 DEFAULT 'SITE', REF_VALUE IN VARCHAR2 DEFAULT '99');
    END PAC_LOG_ERROR;
    create or replace
    PACKAGE BODY PAC_LOG_ERROR
    AS
      /* Private Constant */
      CR    CONSTANT CHAR(1)  := CHR(13);  -- Retour chariot
      LF    CONSTANT CHAR(1)  := CHR(10);  -- Saut de ligne
      CR_LF CONSTANT CHAR(2)  := LF || CR; --Saut de ligne et retour chariot
      TAB   CONSTANT PLS_INTEGER := 50;
      sDelay   CONSTANT PLS_INTEGER := 30;
      /* Private Record */
      TYPE REC_LOG IS RECORD(
        ERR_DATE TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
        ERR_TXT  VARCHAR2(4000)
      /* Private Type Table */
      TYPE TAB_VALUE IS TABLE OF REC_LOG INDEX BY PLS_INTEGER;
      TYPE TAB_POINTER IS TABLE OF TAB_VALUE INDEX BY VARCHAR2(80);
      /* Private Variables Structures */
      LOG_TRC PARAM_TECHNIC.PRM_VALUE%TYPE;
      LIST_PARAM TAB_POINTER;
      /* Private Programs */
      FUNCTION GET_PROC_NAME( SOURCE_OWNER IN all_source.OWNER%TYPE
                             ,SOURCE_NAME  IN all_source.NAME%TYPE
                             ,SOURCE_LINE  IN all_source.LINE%TYPE) RETURN VARCHAR2
      AS
        SOURCE_TEXT  all_source.TEXT%TYPE;
        TYPE RECORD_TEXT IS TABLE OF all_source.TEXT%TYPE;
        RETURN_TEXT     RECORD_TEXT;
      BEGIN
        SELECT * INTO SOURCE_TEXT
        FROM (SELECT TEXT FROM all_source
            WHERE OWNER = SOURCE_OWNER AND
                  NAME=SOURCE_NAME AND
                  TYPE IN ('PROCEDURE','FUNCTION','PACKAGE BODY') AND
                  LINE <= SOURCE_LINE AND SUBSTR(TRIM(TEXT),1,9) IN ('PROCEDURE','FUNCTION ')
            ORDER BY LINE DESC)
        WHERE ROWNUM = 1;
        IF SOURCE_TEXT IS NOT NULL OR  SOURCE_TEXT != '' THEN
          SOURCE_TEXT := TRIM(SUBSTR(SOURCE_TEXT,1,INSTR(SOURCE_TEXT,'(')-1));     
          SOURCE_TEXT := LTRIM(LTRIM(TRIM(SOURCE_TEXT),'PROCEDURE'),'FUNCTION');
          SOURCE_TEXT := SOURCE_NAME||'.'|| TRIM(SOURCE_TEXT);
        ELSE
          SOURCE_TEXT := 'ANONYMOUS BLOCK';
        END IF;
        RETURN SOURCE_TEXT;
      END GET_PROC_NAME;
      PROCEDURE SELECT_MASTER(REF_TYPE IN VARCHAR2, PARAM_VALUE IN VARCHAR2, SITE OUT VARCHAR2, REF_MASTER OUT VARCHAR2)
      AS
      BEGIN
          REF_MASTER := '';
          SITE := '99';
          CASE UPPER(REF_TYPE)
            WHEN 'PO' THEN -- Process Order
              SELECT SITE_CODE INTO SITE FROM PO_PROCESS_ORDER WHERE PO_NUMBER = PARAM_VALUE;
            WHEN 'SO' THEN -- Shop Order
              SELECT P.SITE_CODE,P.PO_NUMBER INTO SITE,REF_MASTER FROM SO_SHOP_ORDER S
              INNER JOIN PO_PROCESS_ORDER P ON P.PO_NUMBER = S.PO_NUMBER
              WHERE S.NUMOF = PARAM_VALUE;
            WHEN 'SM' THEN -- Submixing
              SELECT SITE_CODE,NUMOF INTO SITE,REF_MASTER FROM SO_SUBMIXING WHERE IDSM = PARAM_VALUE;
            WHEN 'IDSM' THEN -- Submixing
              SELECT SITE_CODE,NUMOF INTO SITE,REF_MASTER FROM SO_SUBMIXING WHERE IDSM = PARAM_VALUE;
            WHEN 'PR' THEN -- Pourring
              SELECT B.SITE_CODE,P.NUMOF INTO SITE,REF_MASTER FROM SO_POURING P
              INNER JOIN SO_SUBMIXING B ON B.IDSM=P.IDSM
              WHERE P.IDSM = PARAM_VALUE;
            WHEN 'NUMSMP' THEN -- Pourring
              SELECT SITE_CODE,NUMOF INTO SITE,REF_MASTER FROM SAMPLE WHERE NUMSMP = TO_NUMBER(PARAM_VALUE);
    --        WHEN 'MSG' THEN -- Messages
    --          SELECT SITE_CODE,PO_NUMBER INTO SITE,REF_MASTER FROM CMS_INTERFACE.MAP_ITF_PO WHERE MSG_ID = PARAM_VALUE;
            ELSE
              SITE := sys_context('usr_context', 'site_attribute');
          END CASE;
      EXCEPTION
        WHEN OTHERS THEN
          REF_MASTER := '';
          SITE := sys_context('usr_context', 'site_attribute');
      END SELECT_MASTER;
      PROCEDURE ADD_LIST_PROC
      AS
      PRAGMA AUTONOMOUS_TRANSACTION;
      BEGIN
        MERGE INTO LOG_PARAM A
        USING (SELECT OWNER, TYPE
                     ,NAME PROC
                     , CASE NAME WHEN SUBNAME THEN NULL
                                 ELSE SUBNAME
                       END SUBPROC
               FROM (
                  SELECT owner,TYPE,UPPER(NAME) NAME,UPPER(trim(substr(substr(trim(text),1,instr(trim(text),'(')-1),instr(substr(trim(text),1,instr(trim(text),'(')-1),' ')))) SUBNAME
                         FROM ALL_SOURCE where owner in ('CMS_ADM','CMS_INTERFACE')
                                             and type in ('FUNCTION','PROCEDURE','PACKAGE BODY')
                                             and (instr(substr(trim(text),1,instr(trim(upper(text)),'(')-1),'FUNCTION') = 1 or instr(substr(trim(text),1,instr(trim(upper(text)),'(')-1),'PROCEDURE')=1)
               )-- ORDER BY OWNER,PROC,SUBPROC NULLS FIRST
        ) B
        ON (A.OWNER = B.OWNER AND A.TYPE = B.TYPE AND A.PROC=B.PROC AND NVL(A.SUBPROC,' ') = NVL(B.SUBPROC,' '))
        WHEN NOT MATCHED THEN
          INSERT (OWNER,TYPE,PROC,SUBPROC) VALUES (B.OWNER,B.TYPE,B.PROC,B.SUBPROC)
        WHEN MATCHED THEN
          UPDATE SET ACTIVE = ACTIVE;
        DELETE LOG_PARAM A
        WHERE NOT EXISTS (SELECT OWNER, TYPE
                     ,NAME PROC
                     , CASE NAME WHEN SUBNAME THEN NULL
                                 ELSE SUBNAME
                       END SUBPROC
               FROM (
                  SELECT owner,TYPE,NAME,upper(trim(substr(substr(trim(text),1,instr(trim(text),'(')-1),instr(substr(trim(text),1,instr(trim(text),'(')-1),' ')))) SUBNAME
                         FROM ALL_SOURCE where owner in ('CMS_ADM','CMS_INTERFACE')
                                             and type in ('FUNCTION','PROCEDURE','PACKAGE BODY')
                                             and (instr(substr(trim(text),1,instr(trim(text),'(')-1),'FUNCTION') = 1 or instr(substr(trim(text),1,instr(trim(text),'(')-1),'PROCEDURE')=1)
               ) WHERE A.OWNER = OWNER AND A.TYPE = TYPE AND A.PROC=PROC AND NVL(A.SUBPROC,' ') = NVL(SUBPROC,' '));
        COMMIT;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END ADD_LIST_PROC;
      PROCEDURE INITIALIZE
      AS
      BEGIN
        LIST_PARAM.DELETE;
        CLEAN;
    --    ADD_LIST_PROC;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END INITIALIZE;
      PROCEDURE CLEAN
      AS
        PRAGMA AUTONOMOUS_TRANSACTION;
        dtTrcLog DATE;
        dtTrcErr DATE;
      BEGIN
        BEGIN
          SELECT dbdate-NUMTODSINTERVAL(to_number(PRM_VALUE),'DAY') INTO dtTrcLog
          FROM PARAM_TECHNIC WHERE PRM_TYPE = 'DEL_TRC_LOG';
        EXCEPTION
          WHEN OTHERS THEN
            dtTrcLog := dbdate -NUMTODSINTERVAL(sDelay,'DAY');
        END;
        BEGIN
          SELECT dbdate-NUMTODSINTERVAL(to_number(PRM_VALUE),'DAY') INTO dtTrcErr
          FROM PARAM_TECHNIC WHERE PRM_TYPE = 'DEL_TRC_ERR';
        EXCEPTION
          WHEN OTHERS THEN
            dtTrcErr := dbdate -NUMTODSINTERVAL(sDelay,'DAY');
          END;
        DELETE FROM ERROR_LOG WHERE ERR_TYPE ='LOG' AND ERR_DATE < dtTrcLog;
        DELETE FROM ERROR_LOG WHERE ERR_TYPE ='ERROR' AND ERR_DATE < dtTrcErr;
        COMMIT;
      EXCEPTION
        WHEN OTHERS THEN
          NULL; -- Do nothing if error occurs and catch exception
      END CLEAN;
      PROCEDURE RESETS(IN_SOURCE IN VARCHAR2 DEFAULT NULL)
      AS
        SOURCE_OWNER all_source.OWNER%TYPE;
        SOURCE_NAME      all_source.NAME%TYPE;
        SOURCE_LINE      all_source.LINE%TYPE;
        SOURCE_TEXT  all_source.TEXT%TYPE;
        SOURCE_PROC  VARCHAR2(32727);
      BEGIN
        OWA_UTIL.WHO_CALLED_ME(owner    => SOURCE_OWNER,
                               name     => SOURCE_NAME,
                               lineno   => SOURCE_LINE,
                               caller_t => SOURCE_TEXT);
        IF SOURCE_PROC IS NULL THEN
          SOURCE_PROC := SUBSTR(GET_PROC_NAME(SOURCE_OWNER,SOURCE_NAME,SOURCE_LINE),1,125);
        ELSE
          SOURCE_PROC := IN_SOURCE;
        END IF;
        LIST_PARAM.DELETE(SOURCE_PROC);
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END RESETS;
      PROCEDURE PUT_LINE(TXT IN VARCHAR2)
      AS
        PRAGMA AUTONOMOUS_TRANSACTION;
        SOURCE_OWNER     all_source.OWNER%TYPE;
        SOURCE_NAME     all_source.NAME%TYPE;
        SOURCE_LINE     all_source.LINE%TYPE;
        SOURCE_TEXT all_source.TEXT%TYPE;
        SOURCE_PROC VARCHAR2(128); 
      BEGIN
        IF TXT IS NULL OR TXT = '' THEN
          RETURN;
        END IF;
        OWA_UTIL.WHO_CALLED_ME(owner    => SOURCE_OWNER,
                               name     => SOURCE_NAME,
                               lineno   => SOURCE_LINE,
                               caller_t => SOURCE_TEXT);
        SOURCE_PROC := GET_PROC_NAME(SOURCE_OWNER,SOURCE_NAME,SOURCE_LINE);
        IF LIST_PARAM.EXISTS(SOURCE_PROC) THEN
          LIST_PARAM(SOURCE_PROC)(LIST_PARAM(SOURCE_PROC).COUNT+1).ERR_TXT := TXT;
        ELSE 
          LIST_PARAM(SOURCE_PROC)(1).ERR_TXT := TXT;
        END IF;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;   
      END PUT_LINE;
      PROCEDURE LOGS(REF_TYPE IN VARCHAR2 DEFAULT 'SITE', REF_VALUE IN VARCHAR2 DEFAULT '99')
      AS
        PRAGMA AUTONOMOUS_TRANSACTION;
        MASTER_VALUE ERROR_LOG.ERR_MASTER%TYPE;
        SITE PARAMTAB.SITE_CODE%TYPE;
        SOURCE_OWNER     all_source.OWNER%TYPE;
        SOURCE_NAME     all_source.NAME%TYPE;
        SOURCE_LINE     all_source.LINE%TYPE;
        SOURCE_TEXT all_source.TEXT%TYPE;
        SOURCE_PROC VARCHAR2(128);
        ERR_KEY NUMBER;
      BEGIN
    --    NULL;
        OWA_UTIL.WHO_CALLED_ME(owner    => SOURCE_OWNER,
                               name     => SOURCE_NAME,
                               lineno   => SOURCE_LINE,
                               caller_t => SOURCE_TEXT);
        SOURCE_PROC := SUBSTR(GET_PROC_NAME(SOURCE_OWNER,SOURCE_NAME,SOURCE_LINE),1,128);
        LIST_PARAM.DELETE(SOURCE_PROC);
    --    SELECT NVL(MAX(ACTIVE),'N') INTO LOG_TRC FROM LOG_PARAM WHERE TRIM(UPPER((PROC||'.'||SUBPROC))) = TRIM(UPPER(SOURCE_PROC))
    --                                      AND OWNER =SOURCE_OWNER AND TYPE = SOURCE_TEXT ;
    --    IF LOG_TRC = 'N' THEN
    --      LIST_PARAM.DELETE(SOURCE_PROC);
    --      RETURN;
    --    END IF;   
    --    SELECT_MASTER(REF_TYPE => UPPER(REF_TYPE), PARAM_VALUE => REF_VALUE, SITE => SITE, REF_MASTER => MASTER_VALUE);
    --    ERR_KEY := TO_CHAR(LOCALTIMESTAMP,'YYYYMMDDHH24MISSFF6');
    --    FOR AIX IN 1..LIST_PARAM(SOURCE_PROC).COUNT LOOP
    --      INSERT INTO ERROR_LOG (ERR_KEY, ERR_SITE,ERR_SLAVE  ,ERR_MASTER  ,ERR_TYPE ,ERR_PROC,ERR_DATE,ERR_TXT)
    --      VALUES (ERR_KEY,SITE,REF_VALUE,MASTER_VALUE,'LOG',SOURCE_PROC,LIST_PARAM(SOURCE_PROC)(AIX).ERR_DATE ,LIST_PARAM(SOURCE_PROC)(AIX).ERR_TXT);
    --    END LOOP; 
    --    UPDATE SESSION_CONTEXT SET SCX_ERR_KEY = ERR_KEY WHERE SCX_ID = SYS_CONTEXT('USERENV','SESSIONID');
    --    LIST_PARAM.DELETE(SOURCE_PROC);
    --    COMMIT;
      EXCEPTION
        WHEN OTHERS THEN
          LIST_PARAM.DELETE(SOURCE_PROC);
      END LOGS;
      PROCEDURE ERRORS(REF_TYPE IN VARCHAR2 DEFAULT 'SITE', REF_VALUE IN VARCHAR2 DEFAULT '99', ERR_CODE IN NUMBER DEFAULT SQLCODE, ERR_MSG IN VARCHAR2 DEFAULT SQLERRM)
      AS
        PRAGMA AUTONOMOUS_TRANSACTION;
        MASTER_VALUE ERROR_LOG.ERR_MASTER%TYPE;
        SITE         PARAMTAB.SITE_CODE%TYPE;
        SOURCE_OWNER all_source.OWNER%TYPE;
        SOURCE_NAME      all_source.NAME%TYPE;
        SOURCE_LINE      all_source.LINE%TYPE;
        SOURCE_TEXT  all_source.TEXT%TYPE;
        SOURCE_PROC  VARCHAR2(4000);
        ERR_KEY NUMBER := TO_CHAR(LOCALTIMESTAMP,'YYYYMMDDHH24MISSFF6');
      BEGIN
        OWA_UTIL.WHO_CALLED_ME(owner    => SOURCE_OWNER,
                               name     => SOURCE_NAME,
                               lineno   => SOURCE_LINE,
                               caller_t => SOURCE_TEXT);
        SOURCE_PROC := SUBSTR(GET_PROC_NAME(SOURCE_OWNER,SOURCE_NAME,SOURCE_LINE),1,125);
        SELECT_MASTER(REF_TYPE => UPPER(REF_TYPE), PARAM_VALUE => REF_VALUE, SITE => SITE, REF_MASTER => MASTER_VALUE);
       IF LIST_PARAM.EXISTS(SOURCE_PROC) THEN
          FOR AIX IN 1..LIST_PARAM(SOURCE_PROC).COUNT LOOP
            INSERT INTO ERROR_LOG (ERR_KEY,ERR_SITE,ERR_SLAVE,ERR_MASTER,ERR_PROC,ERR_DATE,ERR_TXT,ERR_CODE,ERR_MSG)
            VALUES (ERR_KEY,SITE,REF_VALUE,MASTER_VALUE,SOURCE_PROC,LIST_PARAM(SOURCE_PROC)(AIX).ERR_DATE, LIST_PARAM(SOURCE_PROC)(AIX).ERR_TXT,ERR_CODE,ERR_MSG);
          END LOOP; 
         LIST_PARAM.DELETE(SOURCE_PROC);
        ELSE
          INSERT INTO ERROR_LOG (ERR_KEY,ERR_SITE,ERR_SLAVE,ERR_MASTER,ERR_PROC,ERR_DATE,ERR_TXT,ERR_CODE,ERR_MSG)
          VALUES (ERR_KEY,SITE,REF_VALUE,MASTER_VALUE,SOURCE_PROC,CURRENT_TIMESTAMP,'Error info',ERR_CODE,ERR_MSG);
        END IF;
        UPDATE SESSION_CONTEXT SET SCX_ERR_KEY = ERR_KEY WHERE SCX_ID = sys_context('usr_context', 'session_id');
        COMMIT;
      EXCEPTION
        WHEN OTHERS THEN
          LIST_PARAM.DELETE(SOURCE_PROC);
      END ERRORS;
    END PAC_LOG_ERROR;

    This package is always call. On each routines performed I execute it. In the trace log of the database we have see a problem we the procedure GET_PROC_NAME in the package. We have identify that is called more that 800x and increase the performance. Who increase is this select command :
        SELECT * INTO SOURCE_TEXT
        FROM (SELECT TEXT FROM all_source
            WHERE OWNER = SOURCE_OWNER AND
                  NAME=SOURCE_NAME AND
                  TYPE IN ('PROCEDURE','FUNCTION','PACKAGE BODY') AND
                  LINE <= SOURCE_LINE AND SUBSTR(TRIM(TEXT),1,9) IN ('PROCEDURE','FUNCTION ')
            ORDER BY LINE DESC)
        WHERE ROWNUM = 1;Complex SQL like inline views and views of views can overwhelm the cost-based optimizer resulting in bad execution plans. Start with getting an execution plan of your problem query to see if it is inefficient - look for full table scans in particular. You might bet better performance by eliminating the IN and merging the results of 3 queries with a UNION.

  • WMI Performance counters not shown in SCOM Performance view

    Hi,
    We're unable to see %CPU usage, avg cpu queue length and many other WMI counters on a Performance View for one of our servers.
    - The agent is displayed as healthy.
    - We are getting data from counters generated by script.
    - WMI counters are shown as enabled.
    - We're able to see the counters locally on server manager, on performance counters.
    - we have run lodctr /R, without success.
    - no alerts on the scom agent or server.
    - no overrides for these counters exist.
    So definitely it looks like the WMI infrastructure is working ok but somehow data is not being sent to the server. Any hints on debugging this issue?
    Thanks in advance

    Ops Manager, Ops DW, or both?  If performance collection is ENABLED for this server, and it's a W2K8 box, and you can see the perf in perf monitor on the server, then you should look to see if other performance is missing.  If there are no performance
    counters being collected, then you can do a few things, but before doing that, do some spot checking.
    Is this rule enabled?  Did someone override disable it?  If enabled, and no overrides, then create a view (my views or whatever that custom workspace is) targetting the generic class of "said" target for the collection rule.  Do you see any
    computers listed?  How many computers are listed?  Jot that down.  Go to discovered inventory in the monitoring pane, and change scope to the targeted class for the collection rule.  Count what is returned, do the number of servers returned
    match?
    If you have the same number of green healthy objects in both the custom view and the discovered inventory scope, then you are good, if there are a few missing, you need to troubleshoot those agents.
    If you are missing all of them, you probably have a problem with your RMS/SQL, which means you have to start traces on SQL and or at the very least look at the ops manager event log on the rms.
    So, back to the "missing a few" scenario.  You could start to do logging, etc, but instead of that, reinstall the agent on one of the machines not showing up in both views.  Wait a few hours.  Check the views again, and keep an eye on the
    ops manager event log on that sick agent.  Increase the size of the log file, if you have too, so you don't over right events.
    After a few hours if it's not showing up, you can either start down the path of enabling tracing on the agent (there are kbs on how to turn this on, and the logs are not hard to go through), or you can uninstall the agent.  Run cleanmom on the box.
     Reinstall the agent.
    I would perform the repair, clean mom, before I troubleshoot the agent, but that's just me.  Keep in mind, any data that is collected and or queued will be lost when you do the clean mom.  But since you have no data as it is, no real loss.
    While the agent is showing up in the console, and before you start down the previous steps, I would verify that you have events collected as well (another query) and stop a service on the box that is supposed to be monitored, see if it triggers and alert
    and a state change.  Also peek at the RMS ops manager event log, you might have some SQL problems.
    Good luck.
    Regards, Blake Email: mengotto<at>hotmail.com Blog: http://discussitnow.wordpress.com/ If my response was helpful, please mark it as so, if it answered your question, then please also mark it accordingly. Thank you.

Maybe you are looking for

  • Decode using bind variable in SQL

    I have decode statement in my SQL query which is used to define the VO object. I want to select a column depending on the value entered for the bind variable :1. dont know how to implement this in OAF - any pointers will be appreciated. decode(:1,'XO

  • Creating an xml file from java.

    I trying to create an xml file using a java program. I just wondering what is the best way to go about it and what should i use jdom ,xerces sax etc.

  • HR Table Update

    Hi SAP Gurus, Should we update PA00.. tables directly using 'Update table...' directly..or we need to use Logical database for it. Is there any harm in updating dirctly....? Thanks in advance, Gaurav

  • Can you send a link to view more than one image?

    I need to send a link to a bunch of images, rather than just one at a time. You can't seem to do that with a folder. Is there any other way to accomplish this? Thanks. Bob

  • Encountered an error when reading it's previous cache and needs to quit.

    uninstalled program and reinstalled. This error appears when the program is started and won't allow me to go any further. I've been using LR5 for at least 6 months with no problem until today.