Using web transaction monitor to record dynamic java sessions.

Hello,
The title may be a bit confusing please forgive me for that :)
I am recording a login-logout session for a business objects portal.
Post login, the web application (as most do) generates unique tokens for each login session and uses that token for subsequent links for that single session.
The problem: SCOM, records the links that were generated during the recording session. Which generates lets say token
abcd. In subsequent iterations of the monitor, the web application will generate different tokens for each logon attempt but SCOM continues to use the links that were generated using the token
abcd. This causes false alerts as the token being used by SCOM is not dynamic!
This is going to be a serious hurdle for us as we have several similar applications and I need to find a work around or solution to this.
Have anybody come across this till now? Any suggestions will be of great help..
Thank you for your time.

Thanks! Exactly what I needed.
I hit a hurdle with that too because the portal I'm trying to monitor is passing the session variable using GET and not POST. We can insert parameters only into POST requests.
I will keep exploring and will post here if I find an answer. Meanwhile, if anybody has experienced this, would appreciate any inputs on how we can insert parameters into GET links directly.

Similar Messages

  • SCOM 2012 SP1 Web Transaction Monitoring with Login test.

    Hi, 
    we setup a web transaction monitor test and did the full recording.  The web site is one that accepts an active directory account for login.  We also setup a runas account that is a valid account for the site and configured NTLM in the settings
    for authetication and set this runas account.
    The test does not fail.    However when we change the runas account password to force a failure, we dont get a failure on the website login test but instead a runas account verfication failure from SCOM.
    How can we configure the web transaction monitor to properly login during the test?   Any guidance would be appreciated.
    Thanks Lance

    So back to the original topic of the thread.
    We setup another test on a site that uses basic authentication.  We setup the web transaction test to use a  login on a initial site that transfers to a second site.  We recorded this entire test and saved.  It seems to work as it gives
    no errors.
    However when we change the Runas account's credentials, which means it CANT login to the site, it still runs fine with no errors.  
    This tells me it is not really logging in but just seeing the http status code is less than 400.
    What am I doing wrong.
    Thanks Lance

  • SCOM2012 Web Transaction Monitor - Displaying the Request Status

    I have successfully created a 'Web Application Transaction Monitor' using the SCOM 2012 R2 Console wizard.  The monitor goes through several listed website URLs and completes.
    What I'm interested in is how to display the 'Request' status objects.  I use the MS-Visio plug-in to display various dashboards within Sharepoint and I would like to display the part of the Web Transaction which is showing an error.
    I can see the individual requests under the Availability of the created 'Web Application Transaction Monitor'.  I just need to capture those objects for displaying within a view or MS-Visio diagrams.
    The email notifications show which of the URLs are having the issue, but I do not seem to find a view or object I can display.
    Any ideas on what could be done would be appreciated.  I was hoping NOT to create individual Web Txn Monitors for each URL, but that maybe the only solution.

    When I create a Dashboard View and add the Alert Widget, I can get the URL from Name Column.
    Juke Chou
    TechNet Community Support

  • Using Web Service from LiveCycle PDF Dynamic Form.

    I have developed Staff Attendance Sheet about 7 years ago using Microsoft Office Web Componenets Data Access Pages (OWC DAP).
    See image below of the current report using OWC DAP:
    http://bit.ly/cAfeYs
    Since we are moving our legacy systems to SAP, this report will have to be re-implemented using Adobe LiveCycle PDF which is connecting to Web Service over SAP Systems (since OWC does not connect to Web Service).
    The SAP development team have developed the initial webservice which generates the required data.
    I have developed the initial version of the LiveCycle PDF, which can be downloaded from this link:
    http://bit.ly/9KBgm0
    The following is a screen snapshot of the LC Desinger Form:http://bit.ly/cxMK62
    When the web service is executed from inside PDF the result looks as follows:
    http://bit.ly/cacbCg
    The webservice accepts the following required parameters:
    1. Period: YYYYMM. User Specified Value.
    2. Staff ID: 9999999. It must be supplied automatcially to the web service and it must be the Windows ID of the User Logged In to Windows
    Domain.
    Other parameters are optional.
    Assumptions:
    ==========
    1. I am not using any Adobe Forms Server Technology. I can use LiveCycle Desinger ES2 and LiveCycle Reader Extensions Server.
    2. I can alse develop using .NET to get the Logged In User ID (Windows), generate the XDP from ASPX Page and attach the XML to the XDP.
    3. We are using IE8 with Adobe Reader 9 Plugin (IE add-on) to display LiveCycle PDF inside IE.
    Questions:
    ========
    1. First time the webservice is executed, I will get a prompt to allow/deny execution of the webservice. This is a security issue here, becuase we do not want any user to know the link to the Web Service. How we can hide the link to the webservice and prevent any user from getting the link ?
    2. How I can stop the Prompt to Allow/Deny execution to the Web Service for good ? As you know, users will get confused, and when we launch this PDF, it will generate a lot of calls to the Service Desk (more than 1000 users).
    3. The Web Service uses Simple User Name/Password for authentication to run the webservice. I need to embed the User Name/Password inside
    the PDF, and also prevent any user for getting them, how ?
    4. I want to send the Staff ID Parameter to the Web Service Automatically which is the Logged In User ID (Windows). This is the same value of the "Login Name" which can be accessed using Acrobat JavaScript. But the problem, this script must be trusted, and it will be a long story. Any ideas how to implement this requirement using simple methods ?
    5. If I manage to send the Staff ID Parameter to the Webservice automatically (Logged In User ID), also, I want to prevent the user from sending a different user ID, ie, prevent him from using Import Data to Form to specify a Different User ID for the Webservice Parameter. How ?
    I appreciate your help if you have any ideas about the above.
    Tarek.

    Hi Tarek,
    First of all, Thank for your replying.
    I have developing Adobe LiveCycle xdp form with a button. The SAP Web Service will be called when the button is pressed.
    Before that, I ‘m able to call another ASP.NET web services by using SOAP.request call. However, when I apply the code to call SAP web service, it doesn’t work. I checked that the web service is valid. And I found that there is something wrong when implementing the SOAP.request call. But I have no idea what wrong is it. So, I beg your help
    The following is the code in the click event of the button:
    //mainData.sfMain.Button7[1]::click - (JavaScript, client)
        var webServiceEndPoint = "http://xxxxxxx.xxxxxxx.com:8000/sap/bc/srt/wsdl/bndg_DEDB492BB032E7F1B09F001CC4FBCEC9/wsdl11/allinone/ws_policy/document?s ap-client=300";
        var staffIDInput = "9999999";
        var oAuthenticator = {
        Username: "usr",
        Password: "pw"
    app.alert("1");
        var response = SOAP.request({
           bEncoded: false,
           cResponseStyle: SOAPMessageStyle.Message,
           cURL: webServiceEndPoint,
           oRequest: {"urn:Z_RFC_GET_STAFF_BANK_INFO":{A_STAFF_ID: staffIDInput}},
             cAction: "urn:sap-com:document:sap:rfc:functions",
            oAuthenticate: oAuthenticator
    app.alert("2");
    WSDL is shown as follow:
    <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions targetNamespace="urn:sap-com:document:sap:rfc:functions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:rfc:functions" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    - <wsdl:documentation>
    <sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl" />
    </wsdl:documentation>
    <wsp:UsingPolicy wsdl:required="true" />
    - <wsp:Policy wsu:Id="BN_ZWS_ALC_GET_STAFF_BANK_INFO">
    - <wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">
    - <wsp:All>
    - <sp:TransportBinding>
    - <wsp:Policy>
    - <sp:TransportToken>
    - <wsp:Policy>
    <sp:HttpsToken />
    </wsp:Policy>
    </sp:TransportToken>
    - <sp:AlgorithmSuite>
    - <wsp:Policy>
    <sp:TripleDesRsa15 />
    </wsp:Policy>
    </sp:AlgorithmSuite>
    - <sp:Layout>
    - <wsp:Policy>
    <sp:Strict />
    </wsp:Policy>
    </sp:Layout>
    </wsp:Policy>
    </sp:TransportBinding>
    </wsp:All>
    </wsp:ExactlyOne>
    <saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true" />
    </wsp:Policy>
    - <wsp:Policy wsu:Id="IF_ZWS_ALC_GET_STAFF_BANK_INFO">
    - <sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">
    <sapsession:enableSession>false</sapsession:enableSession>
    </sapsession:Session>
    <wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" />
    </wsp:Policy>
    - <wsp:Policy wsu:Id="OP_Z_RFC_GET_STAFF_BANK_INFO">
    <sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
    <sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
    <saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
    <saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
    </wsp:Policy>
    - <wsdl:types>
    - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions">
    - <xsd:element name="Z_RFC_GET_STAFF_BANK_INFO">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="A_STAFF_ID" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="Z_RFC_GET_STAFF_BANK_INFOResponse">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="L_BANK_ACC" type="xsd:string" />
    <xsd:element name="L_BANK_ACC_HOLDER" type="xsd:string" />
    <xsd:element name="L_BANK_NAME" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </wsdl:types>
    - <wsdl:message name="Z_RFC_GET_STAFF_BANK_INFO">
    <wsdl:part name="parameters" element="tns:Z_RFC_GET_STAFF_BANK_INFO" />
    </wsdl:message>
    - <wsdl:message name="Z_RFC_GET_STAFF_BANK_INFOResponse">
    <wsdl:part name="parameter" element="tns:Z_RFC_GET_STAFF_BANK_INFOResponse" />
    </wsdl:message>
    - <wsdl:portType name="ZWS_ALC_GET_STAFF_BANK_INFO">
    - <wsp:Policy>
    <wsp:PolicyReference URI="#IF_ZWS_ALC_GET_STAFF_BANK_INFO" />
    </wsp:Policy>
    - <wsdl:operation name="Z_RFC_GET_STAFF_BANK_INFO">
    - <wsp:Policy>
    <wsp:PolicyReference URI="#OP_Z_RFC_GET_STAFF_BANK_INFO" />
    </wsp:Policy>
    <wsdl:input message="tns:Z_RFC_GET_STAFF_BANK_INFO" />
    <wsdl:output message="tns:Z_RFC_GET_STAFF_BANK_INFOResponse" />
    </wsdl:operation>
    </wsdl:portType>
    - <wsdl:binding name="ZWS_ALC_GET_STAFF_BANK_INFO" type="tns:ZWS_ALC_GET_STAFF_BANK_INFO">
    - <wsp:Policy>
    <wsp:PolicyReference URI="#BN_ZWS_ALC_GET_STAFF_BANK_INFO" />
    </wsp:Policy>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <wsdl:operation name="Z_RFC_GET_STAFF_BANK_INFO">
    <soap:operation soapAction="" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    - <wsdl:service name="service">
    - <wsdl:port name="ZWS_ALC_GET_STAFF_BANK_INFO" binding="tns:ZWS_ALC_GET_STAFF_BANK_INFO">
    <soap:address location="http://xxxxxxx.xxxxxxx.com:8000/sap/bc/srt/rfc/sap/zws_alc_get_staff_bank_info/300/zws_alc _get_staff_bank_info/zws_alc_get_staff_bank_info" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

  • Bypass certificate errors in web transaction monitoring

    Hello,
    I have a portal that has a certificate issue which is creating alerts.
    I am getting error code 2147954575  ERROR_WINHTTP_SECURE_FAILURE
    Is there a way to bypass this? When I record session, the browser takes me to the login page without any errors. This is failing only when I run the test from within SCOM.
    Thanks!

    Hi ardnivar,
    Please look at this post:
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/48bafad7-811f-4f3c-b0d9-0031cd486d75/how-do-i-ignore-ssl-errors-in-web-application-availability-monitoring?forum=scomapm
    Natalya
    ### If my post helped you, please take a moment to Vote as Helpful and\or Mark as an Answer

  • Monitoring using Business Transaction Monitoring

    Hi,
    I have deployed BTM for Demo purpose. Its an EAR files.
    How do I start monitoring my services.
    I also deployed SOA composite. But the services are not getting monitored.
    Do I need to install any observer for the demo version too?
    Any pointers would be appreciated.
    Thanks
    Shashank

    For the purpose of demo, I downloaded BTMJavaDemo_11.1.0.5.zip from http://www.oracle.com/technetwork/oem/downloads/btw-downloads-207704.html

  • Web Application Transaction Monitoring Alerts with "wrong" Path

    Hello,
    i have created some web transaction monitors, such as
    http://foo.htm who is  hosted on the server foo123.cologne.org.
    It works.. but
    we have also a mssql monitoring, the discovery of the mssql management pack discovers the reporting part of mssql server on our managementserver Operations12.cologne.org. So (it's right..) the server Operations12.cologne.org is a member of the SQL Instances;SQL
    Compontents;SQL Computers group.
    When the web transaction monitor generates an alert, it have the pathname Operations12.cologne.org and not the pathname of the "right" server foo123.cologne.org.
    For our mssql admins i have build an email-notification, when somethings going wrong at our sql servers (member of the SQL Instances;SQL Compontents;SQL Computers group) they received a mail.
    The problem is, that they received a mail, when a web transaction monitor generated one, because the pathname is the name of our management server, because the management server is a member of thos sql server groups.
    Someone have an idea to fix my "problem"?
    - Best way: changing the path names of the web transaction monitorings... but how? i can't find anything to change..
    Kind regards
    Wolfgang Winter

    Thank you, it's a help to decide, what to do, so i have to solutions:
    - installing an agent to the web-appliction-hosting-server and configure it as a watcher node
       (may be i will have problems with our firewall admins, because they have to allow the communications and.. when the hosting watcher is down, i have no alerts.. when i use more than one watcher nodes (good).. i have the wrong path names..
    - configure a part of our management server group without  SQL-Reporter Component as a watcher node
       (more easy, because i have to tell my firewall admins: "the server foo456 is the standard watcher node"
    Crazy.. because i don't know, how to assign the web transaction monitors to the "causing" server.., for mail notification and for our integration to HP Service Desk...

  • Can't record web session in Web Application Transaction Monitoring using IE10 (Tried under Windows Server 2008R2 and 2012)

    Hi,
    In Operations Manager Console 2012 SP1 including RU2 I am trying to record a web session in Web Application Transaction Monitoring.
    I have check that:
    The add-on (Microsoft Web Recorder Helper) 64bit is Enabled.
    The 64bit version of IE10 is running/launched. See this link for how to modify your registry key if needed:  http://kevingreeneitblog.blogspot.co.uk/2012/01/scom-2012-recording-web-browser-session.html
    I have tried both on a Windows 2008R2 and 2012 server, but the recorder is not showing up as can been seen from Kevin's Blog (link above).
    Any Ideas?

    I managed to get this working on both Windows 8 IE10 and server 2012 IE10. Tested on SCOM 2012 SP1 UR2 and UR3. I've done this process in lab and production several times so hopefully this helps you out.
    Checklist:
    1. Ensure that the 64bit IE10 is launching when the "start web-capture" is started in SCOM.
    2. Enable IE10 internet options:
    a: Advanced - Security - Enable Enhanced Protected Mode
    b: Advanced - Browsing - Enable third-party browser extensions
    3. Close all running IE sessions and open the Registry Editor
    4. Registry Change (No reboot needed)
    - Browse to the following regkey:
    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
    - Add a new DWORD called TabProcGrowth and set it to 0
    5. Registry Change (No reboot needed)
    - Browse to the following regkey:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\Component Categories64\
    -You should see two subkeys labeled: (These are the cached BHO IE objects related to the Web Recorder)
    {00021493-0000-0000-C000-000000000046}
    {00021494-0000-0000-C000-000000000046}
    - Delete only the above two mentioned keys (This will force IE to recache them next launch)
    6. Try to start the web capture again from SCOM 2012 SP1.
    7. When IE10 Launches enable the add-on again if you are prompted.
    8. If you still don't see the Web-Recorder pane in IE you can now show it by:
     - View - Explorer bars - Web Recorder

  • Have Web App/Transaction monitoring alert only when majority of watcher nodes are in error?

    We do a lot of web app/transaction monitoring and we have watcher nodes distributed globally. When we have connectivity issues at a site hosting a watcher node, the web monitors that target the watcher node in that site all alert even though all the other
    watcher nodes are fine.
    We'd like to reduce the noise from our web monitoring by having alerts fire only when a majority, or some other defined ratio, of watcher nodes are in an error condition. Is this possible, and if so, how?
    For reference, we're running 2012 R2 and monitor hundreds of URLs. This list of URLs and watcher nodes is fairly dynamic, so we'd prefer to find a solution that doesn't require manual development (e.g. creating distributed apps), however if that's the only
    path then it would also be good to know.

    First, disable the alerts from the web application that you have created.
    Next, create a new distributed application.  Use the 'Blank (Advanced)' template.  When it comes to choosing the management pack, set it to be the same as the one used for the web monitor.
    Once the distributed application designer has loaded, client the 'Add Component' button.
    Give it a name - Something like 'Appname web monitor component group'
    Choose the 'objects of the following type(s)' radio button.  Navigate the tree:
    Entity -> Logical Entity -> Perspective -> Web Application Perspective -> YOURWEBMONITOR
    Tick the box next to the name of your web monitor.
    Now, on the left, in the Objects bar, you should see the watcher nodes for your web application.  Add ALL the watcher nodes into the component group by dragging them in.
    Now save your distributed application.
    Click the title of the component group that you have just created, down the bottom right of the window there will be a link called 'Configure Health Rollup'.  Click that.
    In the override properties window, Tick the box next to the 'Rollup Algorithm' and change the Override Value to Worst state of a percentage of members in good health state' and override 'percentage' value into your expected value.
    OK the changes and then save the distributed application once again.
    Before you exit the designer, note the name of the component group that you created.
    Finally, we have to enable alerting for that component group.  To do this, exit the designer and you should be back in the Authoring pane of the console.
    Go to "Management Pack Objects\Monitors" in the console.  Click on the Scope toolbar button to  scope the view -
    if a scope was previously active, this will disable the scoped view, so click the button again.  You should be presented with a "Scope Management Pack Objects Window"
    Click the "Clear All" button at the bottom of that window, then type in the
    name of the component group that you noted down earlier into the search box.  A single line should be displayed in the search results.  Tick the box and click OK.
    There should now be a yellow bar saying that the view has been scoped to your web application component group.  Underneath will be a tree view of the monitors in your web applicaion.
    Expand the tree view until you find a monitor called "Component Group Health Roll-up for type..."
    Open the properties of that item, go to the alerting tab and
    enable the "generate alerts for this monitor" checkbox.
    You can then fill in the alert name and description as well as other things like severity and whether or not the alert will close when the monitor is healthy.
    Roger

  • 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/)

  • Using the Model Facade Pattern in a Java EE 5 Web application

    Hi,
    Yutaka and I did a Tech tip
    http://java.sun.com/mailers/techtips/enterprise/2006/TechTips_Nov06.html#2 on using a model facade pattern in Java EE 5 web-only applications recently. We got some questions about it, and these were some of the questions raised...
    Question 1) the first part of the tech tip(it has two articles in it) http://java.sun.com/mailers/techtips/enterprise/2006/TechTips_Nov06.html showed how to access Java Persistence objects directly from a JSF managed bean, is this a good practice?
    Question 2) when to use a facade(as mentioned in the second part of tech tip) ?
    and maybe
    Question 3) why doesn't the platform make this easier and provide the facade for you?
    Briefly, I will take a shot at answering these three questions
    Answer 1) You can access Java persistence directly from your managed beans, but as your application grows and you start to add more JSF managed beans or other web components(servlets, JSP pages etc) that also directly access Java Persistence objects, you will start to see that you are cutting/pasting similiar code to handle the transactions and to handle the Java Persistence EntityManager and other APIs in many places. So for larger applications, it is a good practice to introduce a model facade to centralize code and encapsulate teh details of the domain model management
    Answer 2) IAs mentioned in answer 1, its good to use a model facade when your application starts to grow. For simple cases a spearate model facade class may not be needed and having managed beans do some of the work is a fast way to jumpstart you application development. But a facade can help keep the code clean and easier to maintain as the aplication grows.
    Answer 3) First note that both of the articles in the tech tip were about pure web apps(not using any EJBs) and running on the Java EE5 platform. Yes it would be nice if a facility like this was made available for web-only applications(those not using EJBs). But for web-only applications you will need to use a hand-rolled facade as we outlined in the tech tip. The Java EE platform does provide a way to make implementing a facde easier though, and the solution for that is to use a Session Bean. This solution does require that you use ythe EJB container and have a Session Bean facade to access your Java Persistence objects and manage the transactions. The EJB Session Facade can do a lot of the work for you and you dont have to write code to manage the transactions or manage the EntityManager. This solution was not covered in this tech tip article but is covered in the Java BluePrints Solutions Catalog for Perssitence at
    https://blueprints.dev.java.net/bpcatalog/ee5/persistence/facade.html in the section "Strategy 2: Using a Session Bean Facade" . Maybe we can cover that in a future tech tip.
    Please ask anymore questions about the tech tip topic on this forum and we will try to answer.
    hth,
    Sean

    Hi Sean,
    I'm working on an implementation of the Model Facade pattern where you can possibly have many facades designed as services. Each service extends a basic POJO class which I'm calling CRUDService: its short code is provided below for your convenience.
    The CRUDService class is meant to generalize CRUD operations regardless of the type of the object being used. So the service can be called as follows, for example:
    Job flightAtt = new Job();
    SERVICE.create(flightAtt);
    Runway r = (Runway) SERVICE.read(Runway.class, 2);
    Employee e = (Employee) SERVICE.read(Employee.class, 4);
    SERVICE.update(e);
    SERVICE.delete(r);SERVICE is a Singleton, the only instance of some service class extending CRUDService. Such a class will always include other methods encapsulating named queries, so the client won't need to know anything about the persistence layer.
    Please notice that, in this scenario, DAOs aren't needed anymore as their role is now distributed among CRUDService and its subclasses.
    My questions, then:
    . Do you see any obvious pitfalls in what I've just described?
    . Do you think traditional DAOs should still be used under JPA?
    . It seems to me the Model Facade pattern isn't widely used because such a role can be fulfilled by frameworks like Spring... Would you agree?
    Thanks so much,
    Cristina Belderrain
    Sao Paulo, Brazil
    public class CRUDService {
        protected static final Logger LOGGER = Logger.
            getLogger(Logger.GLOBAL_LOGGER_NAME);
        protected EntityManager em;
        protected EntityTransaction tx;
        private enum TransactionType { CREATE, UPDATE, DELETE };
        protected CRUDService(String persistenceUnit) {
            em = Persistence.createEntityManagerFactory(persistenceUnit).
                createEntityManager();
            tx = em.getTransaction();
        public boolean create(Object obj) {
            return execTransaction(obj, TransactionType.CREATE);
        public Object read(Class type, Object id) {
            return em.find(type, id);
        public boolean update(Object obj) {
            return execTransaction(obj, TransactionType.UPDATE);
        public boolean delete(Object obj) {
            return execTransaction(obj, TransactionType.DELETE);
        private boolean execTransaction(Object obj, TransactionType txType) {
            try {
                tx.begin();
                if (txType.equals(TransactionType.CREATE))
                    em.persist(obj);
                else if (txType.equals(TransactionType.UPDATE))
                    em.merge(obj);
                else if (txType.equals(TransactionType.DELETE))
                    em.remove(obj);
                tx.commit();
            } finally {
                if (tx.isActive()) {
                    LOGGER.severe(txType + " FAILED: ROLLING BACK!");
                    tx.rollback();
                    return false;
                } else {
                    LOGGER.info(txType + " SUCCESSFUL.");
                    return true;
    }

  • How to get the list of values for a dynamic parameter using Web Services SDK?

    <p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>

    <p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>

  • Can I Design a Forum with using web dynpro for java?

    Hi All:
        Can i design a forum with using web dynpro for java?
        I want to design an application like a simple forum which maybe has many replies.So if i use
    the UI technology "web dynpro for java", i will to create UI elements dynamically.How can i control this
    dynamical UI elements to keep layout ?

    Hi,
    yes you can do that....
    for exaple if you observe SDN...
    you can imagine like....
    A big Transparent Container(TC)....
    Inside that number of other TCs(depending upon the question nd its replies...)....
    In side each TC, again around 9 UIElements....
    one for menioning what is the question/reply?
    other for your description of question/reply...
    other for your name,
    displaing your fourm point... etc...
    So it will be
    for(loop till your (Question+No of replies))
    Create Transparent Container....
    Add Childs to the Container...
    Decide your layout....
    In case if you want to know how to create UIElements dynamically....
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/07cf3dd28b5610e10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/dynamic%2bui%2bgeneration
    Regards,
    Srinivas.
    Regards,
    Srinivas.

  • Filtering Transaction Monitor using country location

    Is there a way that Transaction Monitor can filter for SLFN support tickets based on the country of origin of the Business Partner record in the 'Reported By' field?
    Thanks
    Simon

    Thanks for the replies - this is helpful when filtering by country code using T-CODE BP.
    However I am using the transcation monitor (CRM_DNO_MONITOR).
    We are using Service Desk as a global help desk tool with multiple countries submitting tickets. However I cannot find a way to use transaction monitor to filter on the ticket received from one particular country - its seems that it is all or nothing.
    I can add each individual business partner record from the required country and set it as a user variarnt, but this would be very time consuming and tedious as some of our sites that have many users and therefore many BP records.
    Is there a way in transaction monitor I can see tickets just for a particular country.
    I hope this makes sense - but please let me know if I need to clarify anything.
    Thanks
    Simon

  • How to create a user in UME Database using web dynpro java custom application

    Hi,
    Can you please suggest me how to create a user in UME Database using web dynpro java custom application.
    My Requirement is user can register his/her user id in SAP Portal 7.3 UME database.
    Please suggest me.
    Thanks and Regards,
    Amit

    Hi Amit,
    Generated Documentation (Untitled)
    This is what you're looking for, there's no real cook-book -- though Amey mentioned there might be some material on SDN, perhaps some tutorials.
    You should be looking into com.sap.security.api.IUserFactory, methods newUser(String) which gives you and IUserMaint and commitUser(IUserMaint, IUserAccount) -- IUserAccount can be obtained using com.sap.security.api.IUserAccountFactory, method newUserAccount(String)
    Hope it helps,
    D.

Maybe you are looking for

  • Not able to see the accessories in IC Web Client and Web shop

    Hi All, we have configured Method Schema  for Product accessories and maintain the accessories in product master. I am facing an issue where in i cant see the accessories in IC Web Client and webshop. Any input will be a great help. Thanks in advance

  • How can I transfer a variable to regexp_replace function

    Hi, In addition to my question from yesterday, I went up one (little) level for the next question. How can I transfer a variable to regexp_replace function? I am getting the value of the variables from from APEX Items. The value of item :P105_OLD_NAM

  • Address Command in smartform

    Hi all, i am using address command in smartform .there is a radio button for po box and street ..i have to select both po box and street ..is there any way to get the same. also i need to print some hard code text in front of address how can i do it.

  • Are there any options for a company to host Buzzword internally?

    My company currently produces documents using an HTML based editor (around a million docs a year/1500 employees).  For a new project, we'd like a document solution that avoids some of the limitations we're currently dealing with.  For example, we rel

  • ArrayList indices (Phrase counter follow-up)

    Hi everybody-- I finally figured out how to get code onto this computer I'm working with, so here's what I'm trying to do for anyone that doesn't remember. I'm using TuringPest's suggestion to go through my word list once, and then delete any index t