Activity log design issue in web application .. Whatabout AOP ?

Hi guys. ..
I am working on a big web application in which there is module called activity log which actually logs most of the activities one perform in application like make a payment , defere the payment , issue the check etc. Almost all components in the application less or more use this component.
Now what is my issue is its design sucks. Every time a new activity has to added one has to add a separate class for that and make a call at a particular place in other component depending on some logic. sometime it becomes a nightmare to maintain all this.
I am sure there should be better way to do it .without making a call to this component every othere class.
I dont know much about AOP. Is AOP got some solution for that.? or any design pattern I should use to make it maintainable or simple to add new activities whenever need arise.
Thanks
HibernFan.

Hi guys. ..
I am working on a big web application in which there
is module called activity log which actually logs
most of the activities one perform in application
like make a payment , defere the payment , issue the
check etc. Almost all components in the application
less or more use this component.
Now what is my issue is its design sucks. Every time
a new activity has to added one has to add a separate
class for that and make a call at a particular place
in other component depending on some logic. sometime
it becomes a nightmare to maintain all this.
I am sure there should be better way to do it
.without making a call to this component every othere
class.
I dont know much about AOP. Is AOP got some solution
for that.? or any design pattern I should use to make
it maintainable or simple to add new activities
whenever need arise.You are thinking exactly the right thing. AOP is born for this sort of thing, and it addresses exactly the problem you've experienced: Move all that code that's duplicated with every new activity into the advice class.
You can do AOP if you have AspectJ or, better yet, Spring.
If not, you can think of Filters as a kind of AOP. Since this is a Web app you can write a Filter that does the logging for you.
Either way, you've nailed the idea. Good thinking.
%

Similar Messages

  • Configure Log File for each web application deployed in weblogic server usi

    Hi All,
    How do I configure Log4J to log separately for each web application? i.e. Assuming, I have a web application "AWeb" and a web application "BWeb". I need a log file to be created for AWeb Separately and BWeb Separately. i.e. All the log information for "AWeb" web application will be stored in AWeb.log and all the "BWeb" web application will be stored in BWeb.log
    Do you have any sample code and configuration details for the above-mentioned requirement?
    Thanks in Advance,
    C R Baradwaj

    You do not need to do anything strange, just use log4j the usual way with the exception that you do not need to init log4j (this is not necesary when using a log4j.xml.)
    A minimal sample of a log4j.xml is
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.SimpleLayout"/>
    </appender>
    <root>
    <priority value ="debug" />
    <appender-ref ref="ConsoleAppender"/>
    </root>
    </log4j:configuration>
    You just have to be sure that you have different log4j.xml in your classpath for different web applications.
    Regards,
    LG

  • Opening template issue in Web Application Designer (Loading problem)

    Hi,
    When i open a query in Web Application Designer through the BWdev, it is opening but when i open a query in Web Application Designer through the BWProduction it is not opening, it is displaying a msg box like this
      " Operation Failed! NO detailed error information from backend available ".
    In the opening of the webtemplate itself it is showing that box when loading mime type imgs.
      If anybody knows pls send msg.
    Thanks & Regds,
    Giri.

    Hi Giri,
    I have a similar problem ...
    when I give the user SAP_ALL security profile,
    the problem is gone,
    but I DON'T want to do that...
    can you please specify how to give full authentication access to WAD only
    thanks a million!
    Edwin

  • Using Designer to generate Web Applications

    I'm using Designer R1.3 to generate Web applications but example in a textfield i need make a validation how ca i do this using designer without make this using schema manager to correct by hands line by line

    You can certainly do this with JWS. You will have to request full access permissions to the user's machine because you will need to start the web server (& maybe DB server) from your JWS application. Do this with:
    <security>
    <all-permissions/>
    </security>
    That means you'll have to get a certificate for your server.
    In terms of resources - When you start resin, seems to me that all you should need to do is include all of the jars that resin needs in the command line classpath variable. To get access to this information, this code by Masahiro Takatsuka was very useful for me:
    http://forum.java.sun.com/thread.jsp?forum=38&thread=71208
    We did something similar to what you are doing - we ran Apache's Xindice XML DB from the JWS client. (We have since ditched Xindice because of performance issues, but launching it worked fine from JWS)
    good luck!
    catherine

  • Separate logging with log4j for web applications deployed on one server

    I have been trying to get web applications to write to separate log files.
    Log4j.jar is loaded through classpath once during weblogic startup. In each web application, I have Log4j.xml or Log4j.properties configuration files under WEB-INF folder. I hava java class in the application extending HttpServlet and loads the log4j.xml file, In web.xml they have load-on-startup set to 1. Two java class files both extending write the log to the specified log file but other java class files are not logging information, some implement filter, some are action classes (Struts 1.2.9). If the java class has a static method then the log from the method is being written but the log from instance methods is not being written. I tried declaring the variable both as static and non-static
    private Logger log = Logger.getLogger(LoginFilter.class);
    What could be causing some java class files not to log?
    Another issue, For Log4j.xml, Doctype as SYSTEM property set to lookup Log4j.dtd, weblogic complains as Log4j.dtd file not found, tried adding this file in WEB-INF folder, same location as LOg4j.xml and WEB-INF/lib folder and even in classpath, weblogic still complains of log4j.dtd file being not found. For now, I removed SYSTEM entry but need to put it back for parser to validate xml file.
    I am using WLS 8.1.6, struts 1.2.9 and Log4j 1.2.8 versions.
    Any help is appreciated.
    thanks,
    SK

    How we can implement thisBy implementing an SSO product of your choice.

  • Performance issue in web application

    We have installed a web application that uploads a XML file to the server. The application is still in its nascent stage but deployed.
    After analysis we found out that 50 to 100 hits take place at any point of time. We store the XML file as a blog in oracle and use Xquery to retrieve the data. The core apis used are Java Servlets and JSPs and the web server used in Apache Tomcat.
    The hits for upload will increse by 500-600 at point of time.
    I would like to know the following.
    Is the technology used sufficient to handle the issue?
    How can i handle the load balance in the server?

    Use grinder or some other test tool to find out.

  • Performance Issue in Web Application: Event 12605 "Web: Text Content"

    Dear All,
    we are about to deploy a couple of rather complex web applications (built with WAD) and are currently running performance tests with Mercury Loadrunner.
    According to these tests our web application become very slow once more than 30 (virtual) users are running the application.
    When analyzing the BW statistics data we found out that most of the runtime of our application comes from an event called "Web Java: Return Text-Type Content" (ID 12605).
    Has anyone experienced the same issue? Or does anyone know what exactly this event means?
    We are using XPATH in our web applications. Could this be a cause for poor performance?
    Any help is highly appreciated!
    Best Regards
    Christian

    Can you tell me more about the detail of loadrunner stress test for BI WAD scripts? We met error when run the load runner for BI WAD report.
    1. We develop the BI report basing WAD 7.x, setup Iview in sap EP for BI report and get the BI report URL.
        2. We fill the report URL in IE(6.0) to run this report and display the bi report successfully ,
    eg: http://epserver:50000/irj/servlet/prt/portal/prtroot/com.sap.ip.bi.web.portal.integration.launcher?sap-bw-iViewID=pcd%3aportal_content%2fcom.ahepc.BI%2fcom.ahepc.iView%2fcom.ahepc.FI%2fcom.ahepc.BI_I_ZWAFI_006&sap-ext-sid=1

  • What is the design pattern for web application with struts & hibernate?

    Hi everyone,
    I am new to web application developement.I am using struts for MVC framework & Hibernate for ORM framework.I am little confused that struts used bean representation for collecting form fields(Bean 1),value objects(DTO) for passing value to the JSP(Bean 2) & hibernate use the bean like representation for persistent object(Bean 3).Whether we must use all the bean's which are similar to each other or any reusable bean recommended?

    I'm sure why it didn't work. That is how I bundle the JRE. The only disadvantage about bundling is the size of the installer file will be pretty large. In my opinion, relying on a public version is not a good idea if you have no control of the target box. The user might, for some reason, decide to uninstall java or upgrade to a new incompatible version and your app. may stop working. I'm sure many on here will disagree with this though.
    I always use the marner .exe wrapper:
    http://www.megaupload.com/?d=FYZAVM77
    and inno installer:
    http://www.jrsoftware.org/isinfo.php
    They're both free to use and I've had no problems with them. Another wrapper is Javaround:
    http://sourceforge.net/project/showfiles.php?group_id=234356

  • Issue regarding Web Application Designer (WAD) in SP25 / SAP note 1558066

    Dear all,
    we recently applied SAP NetWeaver BI SP25. After the update we encountered severe issues in WAD and applied SAP note 1558066, this means I deleted from RSZWMDITEM all records having MDITEMNAME TARTITLE and afterwards updated metadata.
    The situation improved a lot, i.e. now I can open web templates or close WAD, but I still cannot drop Web Items in layout tab. I am able to include Web Items in overview tab, but again in layout tab I cannot change the sorting or remove Web Items.
    Did anyone come across similar issues and find a solution?
    Thanks for your input, best regards,
    Bjoern

    Hello Björn
    I've exactly the same problem. See
    Could you solve the problem and if yes, how did you do it?
    Thank's
    Patrick

  • Design issue with an application

    Hi
    Requirement : I have an application which needs to access database and show the resultset on the screen.
    The design is as follows:
    (I am implementing Connection Pooling as I have not been able to configure the Tomcat's Connection Pooling)
    1)I have a Main page.
    2)I have a startup servlet(startupservlet.java) which creates a conenction pool by the following call in the init method of the servlet.
    pool = new ConnectionPool(p_url,p_username,p_userpass, p_driverclassname, p_initconnections_i, p_increment_i);
    "ConnectionPool.java" is a class which I have written which has a Hashtable which stores my connections. It also has method to get connection as well.
    3) Now I enter my search parameters on my Main page. On the click of submit button my page calls a servlet "query.java".
    4)In query.java I want to take a conenction from the pool object that was created by the "Startupservlet" using the getConnection() method.
    My first question is :
    a) Is the connection pool object that was created by the startup servlet still available for me to use.
    b) How can I access that connection pool object to get a connection.
    Is there any other approach as well. Is my design correct.
    Any comments would be welcome and highly appreciated.
    Amit

    Write a class that contains the pool. If your database stores, say, Fish:
    public class FishPool
        private static ConnectionPool pool;
        public void initialize() { pool = ...; } // Call this from initializer servlet
    // EITHER:
        public ConncetionPool pool() { return pool; }
    // OR:
        public Connection getConnection() { return pool.getConnection(); }
        public void returnConnection(Connection c) { pool.returnConnection(c); }
    }Then you can do either ("singleton pattern"):
        Connection c = FishPool.pool().getConnection();
        FishPool.pool().returnConnection(c); // In a finally blockor:
        Connection c = FishPool.getConnection();
        FishPool.returnConnection(c); // In a finally block

  • Encoding issues with web application

    Hi guys,
    I have this wired problem that I can't seem to understand.
    I use Tomcat 6 and Eclipse 3.5.1.
    when I'm debugging my project, I come to this simple line:
    String str = "Hebrew word";
    when I look at the code, the Hebrew word is just fine, but after the debugger commit this line, the 'str' variable holds gibberish.
    my project is in utf8. I have no idea what cause this.
    please advise.
    EDIT:
    I tried using Glassfish 2.1 to see what happens, the same thing. maybe its not the server...?
    Edited by: MadUser on Feb 15, 2010 1:48 AM

    Thanks but not really.
    I don't think that My problem concern the HTML encoding, it looks like something else messes things up.
    if I write in a simple class:
    String str = "non English text";
    and I see it just fine in the Eclipse editor but on run time or debug the str variable holds gibberish, I am not sure who or what part is responsible for this issue.
    P.S
    This project use AspectJ.
    Edited by: MadUser on Feb 23, 2010 2:13 AM

  • From a Technical Architect point of view, how to design a web application?

    Hi to all,
    I am writing this issue here because I this question is not related on how to program, but on how to design a web application. That is, this question is not related to how to program with the technologies in J2EE, but how to use them correctly to achieve a desired outcome.
    Basically I know how to develop a simple web application. I like to use SpringFramework with AcegiSecurity and Hibernate Framework to persist my data. I usually use JBoss to deploy my web applications, however I could easily use Tomcat or Jetty (Since I am not using EJB�s).
    However I have no idea on how to develop (or a better word would be �design�) a website which is divided into different modules.
    Usually when you develop a website, you have certain areas that are public, and other areas that are not. For example, a company would want anyone on the Internet to download information about the products they are selling, however they would only want their employees to download certain restricted information.
    Personally I try to categorise this scenario in to common words; Extranet and Intranet.
    But � (and here starts the confusion in my mind) should I treat these two as two projects, or as one project? The content to be displayed on the Extranet is much different then the content to be displayed on the Intranet and definitely clients should not be allowed to the Intranet.
    First approach would be to treat them as the same project. This would be perfect, since if the company (one day) decides to change the layout of the website, then the design would change for both the Intranet and the Extranet version. Also the system has a common login screen, that is I would only need to have employees to have a certain Role so that they have access to the intranet, while clients would not have a certain Role and thus they would not be allowed in. But what about performance and scalability? What if the Intranet and Extranet have to be deployed on the different Hardware!?
    The second approach is to threat them as two separate projects. To keep the same layout you just copy & paste the layout from one project to another. However we would not want to have two different databases to store our users, one for the employees and the other one for the clients. Therefore we would build a CAS server for authentication purposes. Both the Intranet and the Extranet would use the same CAS server to login however they could be deployed on different hardware. However what if we want to change the design. Do we really want to have to just copy and paste elements from one project to another? We all know how these things finish! �We do not have time for that � just change the Extranet and leave the Intranet as it is!�
    The third approach (and this is the one I like most) is to have a single project built into different WAR files. The common elements would be placed in all WAR files. However in development you would only need to change once and the effects would show in the different war files. The problem with this approach is that the project will be very big. Also, you will still need to define configuration files for each one of them (2 Web.config, 2 Spring-Servlet.config, 2 acegi-security.config, etc).
    Basically I would like something in the middle of approach 2 and approach 3! However I can identify what this approach is. Also I can not understand if there is even a better approach then these three! I always keep in mind that there can always be more then two modules (that is not only Intranet and Extranet).
    Anyways, it is already too long this post. Any comments are more then welcome and appreciated.
    Thanks & Regards,
    Sim085

    Hi to all,
    First of all thanks for the interest shown and for the replies. I do know what MVC or Multi-layered design is and I develop all my websites in that way.
    Basically I have read a lot of books about Domain-Driven Design. I divide my web applications into 4 layers. The first layer is the presentation layer. Then I have the Facade layer and after that I have a Service layer (Sometimes I join these two together if the web application is small enough). Finally I have the Data Access layer where lately I use Hibernate to persist my object in the database.
    I do not have problems to understand how layering a web application works and why it is required. My problem is how to design and develop web applications with different concerns that use same resources. Let me give an example:
    Imagine a Supermarket. The owner of the Supermarket want to sell products from the website, however he wants to also be able to insert new products from the website itself. This means that we have two different websites that make use of the same resources.
    The first website is for the Supermarket clients. The clients can create an account. Then they can view products and order them. From the above description we can see that in our domain model we will have definitely an object Account and an object Product (I am not mentioning all of them). In the Data Access layer we will have repository objects that will be used to persist the Account and Products.
    The second website is for the Supermarket employees. The employees still need to have an account. Also there is still a product object. This means that Account and Product objects are common to the two websites.
    Also important to mention is the style (CSS). The Supermarket owner would like to have the same style for both websites.
    Now I would not like to just copy & paste the objects and elements that are common to both websites into the two different projects since this would mean that I have to always repeat the changes I make in one website, inside the other one.
    Having a single WAR file with both websites is not an option either because I would not like to have to deploy both websites on the same server because of performance and scalability issues.
    Basically so far I have tought of putting the common elements in a Jar File which would be found on the two different servers. However I am not sure if this is the best approach.
    As you can see my problem is not about layering. I know what layering is and agree with both of you on its importance.
    My question is: What is the best approach to have the same resources available for different websites? This includes Class Files, CSS Files, JavaScript Files, etc.
    Thanks & Regards,
    Sim085

  • Web application designer basics

    hi experts,
    i am bw learner and want to know few things
    1) how do we publish report developed in web application designer so that we can access it on internet. Is there any webserver offered by sap.
    2) how that report will be authenticated in browser, do we have to create a login page for users or is there any built in one.
    3) Does web application designer comes with Sap GUI (like bex analyzer) or do we have to install separate programme.
    Points will be assigned. thanks

    I would suggest that you search the forums first ...
    1) how do we publish report developed in web application designer so that we can access it on internet. Is there any webserver offered by sap.
    SAp BI comes with a ABAP Web server and a JAVA web server. You can publish the web template / report using these servers ... they can be directly accessed using the URL ( the application has a feature to execute the same in the web ) or the same can be published as a page on Enterprise portal and then accessed from there.
    2) how that report will be authenticated in browser, do we have to create a login page for users or is there any built in one.
    The access for the same will be through the BI login. When you execute the URL , you will be prompted to login by the server and you do not need to create a separate login page for the same. You can also access them through Enterprise portal where the user needs to login to the enterprise portal and then access all systems using a Single Sign On or SSO.
    3) Does web application designer comes with Sap GUI (like bex analyzer) or do we have to install separate programme.
    The front end for Web Application designing is called Web Application designer and it gets installed along with your GUI installation and you can design the templates using the same.
    Note: WAD is getting phased out by Xcelsius as part of the BI BO roadmap but then with extended support you will have WAD supported till about 2016 I guess so nothing to worry right now.

  • Error run web application designer 3.X

    hello forum,
    When I run the tool designer of the web application version 3.x.
    jumps the following error:
    Run-time error "75"
    Path / file access error.
    I have installed the patch:
    gui710_7-10002995.exe: Patch Level 7 for SAP Logon.
    bi710sp05_500-10004472.exe: BI Add-on 7.x, Support Package 5, Patch Level 5.
    And he still does not work, you know if I need to install any more patch or perform some sort of setup?
    A greeting and thanks.

    Hi,
    You are talking in the query designer?
    But that will only appear the result (with value) red or green or yellow, correct?
    The idea is not to show the value, only the light.
    Example:
    I have the following:
    Client|Value|
    11    | 10eur
    12    | 12eur
    13    | -2eur|
    The idea is to have the following:
    Client|Alert|
    11    |  Green
    12    |  Green
    13    |  Red
    Green to positive, red to negative, but only a light, no values displayed.
    Thanks!
    Edited by: Pedro Taveira on Nov 3, 2011 2:03 PM

  • I get 'SAP BEx web Application designer has stopped workin' when click WAD

    Hi,
    When I click on WAD(Web Application Designer option from Business Explorer menu),
    I get "SAP BEx web Application designer has stopped working".
    I am running VISTA.
    Any hints on how to deal with this problem?
    Thanks

    Hi,
    I uninstalled and installed again the GUI and Bex Explorer
    I installed again SetUpAll.exe and selected:
    --SAP GUI for Windows 7.10 (Compilations3)
    --BW 3.50 Add-On for SAP GUI 7.10
    --Business Explorer
    On completion, I had two options for WAD:
    --Web Application Designer (SAP BW 3.x)
    --Web Application Designer
    When I point my mouse on "Web Application Designer " for selection, there is a message that
    "Business Explorer Web Application Designer  - Can only be used in SAP NetWeaver 7.1"
    and when I go ahead to click on it, I get the error message I reported in my initial post
    If I select Web Application Designer (SAP BW 3.x), it takes me in alright but the view is a bit different, in that in the New template of the Web Application, on the right pane, I do not see the icon for DataProvider which used to be there when I used to work in "Web Application Designer" instead of  "Web Application Designer (SAP BW 3.x)"
    Any hints?
    Thanks

Maybe you are looking for

  • Computer monitor color inverted

    A month ago my HP mini's monitor started displaying colors inverted (Blue is orange; black is white; white is black). It was bearable for a while because I was using an external monitor, but then my external monitor port broke out of no where as well

  • WPA2 Enterprise connections don't work

    Hi everyone, Configuration: MacBook Pro 7,1, 2,4GHz, Mac OS X 10.6.5. Three user accounts (one for me, two for friend's backup), two of them have admin rights. I'm using one of these accounts. I'm having a strange issue with *WPA2 Enterprise*-based a

  • Old itunes library preventing transfer of songs

    Gonna explain the best I know how... have a Sony Vaio with Vista. Had iTunes and iPod working fine. Catastrophe strikes computer, just finished total recovery disk shindig, therefore sacrificing everything. Now computer is up and running again. Insta

  • Extracting photos/graphics from FrameMaker

    From a FrameMaker 11 book, I want to extract all the imported photos and graphics and put one on each slide of a PowerPoint presentation. This way our trainer can present the photos/graphics to our trainees in person and quiz them on what is shown in

  • Invoice --- quantity block

    Hi Gurus, I created a Po in which GR based IV indicator unchecked(in item detail --invoice tab). Then done Invoice without doing GR... Now the invoice status is showing as quantity block wat could be the reason... regards, subbu