Suggestions regarding corej2ee design patterns

hi all
i wanted to go through the core j2ee design pattern but i don't know which one to refer and what to
so i need suggestions that what to read in a design pattern
and which is the best book or pdf if possible send me the link too

Core J2EE patterns are not what they were. A lot of them would be considered anti-patterns, work arounds for deficiencies in the EJB 1.0 and 2.0 specs that have been addressed in EJB 3.0.
The "Core J2EE Patterns" (Amazon.com search will find it) sounds like what you want.
%

Similar Messages

  • Regarding which design pattern to use for this scenario???

    hi guys
    I am working on a J2EE application where I need to do translations for 3 different scenarios. It is basically a conversion from service order objects to invoices.
    First from a service order object to an invoice.
    Second a conversion from a transaction table.
    Third a conversion from a remote system.
    Finally the product is an invoice..
    What design pattern can i use ....is strategy pattern a good idea??
    Thanks
    J

    Hi,
    I think your problem is in result state. You can you sequencial block but for approve or reject you need to set target for each result state. Here I am providing a link. I think you will get your solution here please go through it.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/429bbd709914bce10000000a155369/frameset.htm
    if you have any query please let me know.
    Thanks
    Chandan

  • Suggest what design pattern is applicable for my case

    I have an object called GrantAward , these awards I have to show to the user for selection
    1. I call a web service to get list of GrantAwards.
    2.for each GrantAward check if this is present in my database
    a. if not there insert
    3.for each GrantAward check some conditions
    a if satisfied add to the list to show to user
    b if not satisfied do not add to list .
    these are the steps involved before I can show the GrantAwards to user for selection , please suggest me what design pattern can I use ?

    I'm not sure you want to hunt for patterns when you already know what you are implementing. A lot of people have pattern fever. Patterns are useful constructs for communicating design ideas and enforcing best practices. But I rarely go out and hunt for a specific pattern (or name my objects after patterns). If you are doing a heavyweight methodology with RUP or something similar, I could see stereotyping your UML with patterns.
    That having been said, you already have a Facade with your service. You are undoubtedly using DataAccessObject to fetch your records. Your conditions could be implemented with a ChainOfResponsibility and/or Strategy pattern. What you return could be a Composite. Potentially the request and response are a Command. And your overall architecture could be MVC.
    But IMO that is overkill.
    - Saish

  • Design Pattern / Best Practice Question

    Hi,
    I have been using Flex for a while now, but there is a
    scenario which I still have not found a solution I'm entirely happy
    with. I'm wondering if anyone else out there might have suggestions
    on a design pattern or best practice.
    Suppose I have a view which depends on model data which
    resides in some back end systems. That model data may or may not
    have been loaded (e.g. via a web service or remote object call) at
    the time the view is displayed.
    I don't know if the user will ever visit this part of the
    application so I would prefer to defer retrieval of the data until
    the user actually navigates to this view. Or I want to retrieve the
    data each time the view is displayed because the data is dynamic
    and could change between one presentation of the view and the next.
    Because the data comes from several systems, I cannot simply
    make one service call and display the view when it completes and
    all the data is available. I need to call several services which
    could complete in any order but I only want to display my view
    after I know all of them have completed and all of the model data
    is available. Otherwise, I can present the user an incomplete view
    (e.g. some combo boxes are empty until the corresponding service
    call to get the data completes).
    The solution I like best so far is to dispatch a single event
    (I am using Cairngorm) handled by a single command which acts as
    the caller and responder for all of the services. This command then
    remembers which responses it has received and dispatches another
    event to navigate to the view once all the results have returned.
    If the services being called are used in different
    combinations on different screens, this results in proliferation of
    events and commands. An event and command for each service and
    additional events and commands to bundle the services and the
    handling of their responses in the right combinations for each of
    the views.
    Another approach is to have some helper class listen for all
    of the model changes and only display the view when the model
    enters some state that is acceptable. It is sometimes difficult to
    determine just by looking at the model whether it is in the right
    state (e.g. how can I tell that a collection is the new collection
    that should just have been requested versus an old one lingering
    from a previous call). The logic required can get kind of
    convoluted and brittle.
    Basically, all of the solutions I've come up with so far seem
    less than ideal and a little hackish. I keep thinking there is some
    elegant solution out there that I am just missing ... but so far,
    no luck finding it. Thoughts?
    Thanks.
    Bill

    i think a service class is right - to coordinate your calls.
    i would have 1 event per call (so you could listen to individual
    responses if you wanted to).
    then i would use a flag. if you want to check for staleness,
    you would probably want two objects to map your service flag to
    lastRequested and lastCompleted. when you check, check if it's
    completed, and if it's not stale and that your lastRequested is
    less than lastCompleted (meaning that you're not currently waiting,
    i.e. you've returned since making a request). then make the request
    and update your lastRequested.
    here's a snippet of what i mean.
    ./paul
    public static const SVC1_LOADED:int = 1;
    public static const SVC2_LOADED:int = 2;
    public static const SVC3_LOADED:int = 4;
    public static const SVCALL_LOADED:int = 7;
    private var completedFlag:int = 0;
    then each call would have it's own callback.
    private function onSvc1Complete( evt:Event):void {
    completedFlag |= SVC1_LOADED;
    lastCompleted[ SVC1_LOADED ] = getTimer();
    dispatchEvent( new Event("svc1complete") );
    checkDone();
    private function checkDone():void{
    if( completedFlag == SVCALL_LOADED )
    dispatchEvent(new Event( "allLoaded" ));

  • Database Design Pattern

    hi all,
    I am developing a J2SE application which is communicating with two DB schemas.
    Do any one suggest any good design pattern to manage these type of situation.
    I was thinking to create two DAO classess for two different DB schemas?
    I am using oracle 10g as database.
    Regards

    Keep in mind that Oracle is not a database. Oracleis a database management system (DBMS).
    RDBMS, no? Both acronyms apply; Oracle is a DBMS and a RDBMS.
    Then what is the official name for the
    database itself? There is no official name for "the" database, because Oracle is not a database. Oracle, SQL Server, etc. are software for managing relational databases. They provide users with the ability to create relational databases. They provide various transactional and security features related to relational databases. They host a query language interpreter so that users can search relational databases. They have internal systems databases for managing the databases that users create.

  • [DESIGN PATTERN] Factory: Define Method Area

    Hi Guys,
    I have a question regarding the Design Pattern:Factory. According my need the question is below as:
    I have the Abstract Class AAA with it own Abstract method that create objects (only one method).
    I have a Final Sub-Class  BBB with 20 instantiate methods + the inherited method from Class AAA.
    BBB->method_bbb1().
    BBB->method_bbb2().
    BBB->method_bbb3().
    I have a Final Sub-Class  CCC with 10 instantiate methods + the inherited method from Class AAA.
    CCC->method_ccc1().
    CCC->method_ccc2().
    CCC->method_ccc3().
    Afterwards:
    Class BBB is instantiated through the Factory. The TYPE of BBB is AAA.
    Class CCC is instantiated through the Factory. The TYPE of CCC is AAA.
    My question is:
    How could I use the 20 methods of BBB without to declare them in AAA (without inheritance). Because, if I declare them in AAA, consequently they will be visible in CCC. And I don't want to ...
    DATA BBB TYPE REF TO AAA. "Var Object BBB is type of Class AAA
    DATA CCC TYPE REF TO AAA. "Var Object CCC is type of Class AAA
    BBB = AAA=>Factory( 'BBB' ).
    CCC = AAA=>Factory( 'CCC' ).
    " I want to call, in that way:
    BBB->method_bbb1().
    CCC->method_ccc1().
    CCC->method_bbb1(). " RAISE ERROR
    I have found a way but I don't know if it's breaking the rules of the Factory Concept.
    Have you got any idea?
    Thank you in advance.
    Rachid.

    Hi,
    If you have declared the methods in abstract class as protected or public and if you are inheriting it to the sub classes, then the methods will be available in the subclasses. There is no way to restrict like few abstract methods needs to be inherited and others need not be inherited. The inherited classes are forced to implement the abstract methods.
    In your scenario, i do not think there is a need of abstract class, as I assume that both of your classes does some stand alone logic( as per your question ) compared to the other and doesn't have any common operations. Could you please let us know about this in detail ?? What about INTERFACES ?, Please have a look into it.
    Kesav

  • Please suggest me a suitable design pattern for the scenario below

    Hello,
    I have around three to four methods in a class. And their invocation is mutually exclusive that only one of them can be called depending upon the scenario. usually to acheive this, what we do is, write if and else loops and depending upon the scenario, we call the method correspondingly. i thought of avoiding this if else loops and would like to know whether there is any possibility for achieving the same without if else loops? if yes how do we do this? is there any design pattern available?
    Thanks, Aravinth

    Hi,
    In java we have something is called reflection; reflection is very powerful API. I would suggest the below to start with
    public class Foo {
         public static final String METHOD_ONE="methodOne";
         public static final String METHOD_TWO="methodTwo";
         public void methodOne() {
              System.out.println("method one is being invoked..");
         public void methodTwo() {
              System.out.println("method two is being invoked..");
         public void methodInvoker(String scenario) throws Exception {
              Class clazz =this.getClass();     
              Method method =clazz.getMethod(scenario, new Class[]{} );
              method.invoke(this, new Object[]{});
         public static void main(String args[] ) throws Exception  {
              Foo foo = new Foo();
              foo.methodInvoker(Foo.METHOD_ONE);
              foo.methodInvoker(Foo.METHOD_TWO);
         }I hope this could help
    Regards,
    Alan Mehio

  • Suggest good book for J2EE Design Pattern.

    Is there any good book for J2EE Design pattern? I know Head First Design Pattern book, but is focuses oncore java. I want to learn in detail with examples J2EE design pattern.
    Please suggest good books.
    Thanks in advance.
    Rahul.

    most j2ee patterns are discredited now. they were mostly workarounds for deficiencies in ejb 1 & 2 specs.
    "core j2ee patterns" is your best bet, but take it with a grain of salt.
    better to learn spring, IMO:
    springframework.org
    %

  • Regarding  design pattern

    Hi,
    This is swapna,
    I don�t have any idea about design patterns, plz.anybody help me
    regarding this, where I can get relevant information about design patterns
    Thanks in advance
    With regards
    Swapna.M

    Check http://hillside.net/patterns/onlinepatterncatalog.htm or http://dmoz.org/Computers/Programming/Methodologies/Patterns_and_Anti-Patterns/ for a catalog of online resources about patterns!
    Or google for design patterns

  • Can you suggest a Design pattern for moving a desktop app to  web?

    Hi,
    I have been asked to move a desktop applciaiton which has Serialized files as persistant layer in to Web, can anyone suggest me a good design pattern to accomplish this.

    I dont know what data is in the files, but I suggest looking at creating a set of database tables, normalize them, and copying the data to the tables (via java). Have a DBA review your database schema design if possible before copying the data. Then, use MVC design as I describe here:
    http://forums.sun.com/thread.jspa?messageID=10786901
    Once you get experience in the MVC design described above, your next project can use MVC with a framework such as Java Spring (a more advanced topic). You should read a book cover on Spring to cover on it first.

  • Are there any Client/Server Application (using sockets) design patterns?

    Hi,
    The title of the post nearly says it all. I am searching for different design patterns related with the development of a client/server application. I understand that there must be any different ways on how a client/server application can be developed.
    Regards,
    Sim085
    Disclaimer:
    When I enter in the Socket forum on this site I recieve this message "Thank you for any participation in this forum. Due to a lack of relevant activity, we have decided to archive this forum on June 16, 2006. For future posts on this topic, we suggest you use the Networking forum" and I am not allowed to create a new post! However I can see posts done yesterday! All i did is add the forum in 'my forums'. Does this happen to you people as well?

    Hi Sim085...How are you?
    So look this:
    http://forum.java.sun.com/thread.jspa?threadID=5148926&tstart=75
    I don�t know if is what you want...but I hope in this^^
    Ok man...If you have one example for help you is better.
    [ ]

  • State Machine and producer consumer design patterns

    Hi!
    In my application I am using state machine(for top level VI) and producer consumer(for subVIs) design patterns throught out.
    If there is no activity on the front panel for 1min then the ideal state is invoked. Following are the situation of the ideal state:
    1. It checks for any hardware present on the network . If no hardware is found on the network within 1 min then the application and LabVIEW exits.
    2. While the ideal state checks for the hardware, and user clicks on any front panel button then it should exit the ideal state. The control
    should be in the respective button state.
    I am able to achive the point#1 mentioned above but could not get the point #2 to work. I am including the snap shot of
    the state machine(default case) and prouducer consumer(deafualt state).
    Each screen has the concept of the ideal state. The only additional step in the subVIs is that when the ideal state is reached and the time has expired then it will close the subVIfront panel.It will go to the exit state of the Main(top level) VI. Thus closing the application and quitting LabVIEW.
    Any ideas or suggestions. Will multithreading and notifiers help?
    TIA
    Rachana
    Attachments:
    Sanpshot_Of_Design.zip ‏75 KB

    Hi Rachana,
    I was thinking about using event structures wherein there would an event case that would handle any value change event for any of the buttons on the front panel. But before suggesting that, I would need to know more about the Ideal State subvi( more specifically, how is it checking for any hardware present on the network and where is the one minute wait coming from?).
    Please feel free to respond to this post with your questions/comments.
    Regards,
    Ankita A.

  • Dependancy of  Appliacation Performance  on Package Design Patterns ??

    Hi
    Recently one of my collegue have suggested us to change the data base package design pattern ., i.e to design the package as per the database functionality but not as per the application functionality.
    Example to say ., to integrate all the Data retrivel Sp's into a single Package , All the Update functionality into another package so on... i was totally refused to do so as i never find as such practice in my career.,
    We design the packages as per the Application functionality i.e for each module we design one or more packages so that the developer working on that particulor module can access the Packaged objects very easily and also this will improve the Application modularity & effeciancy.
    Can any one say, what will be impacts on the Appliacation Performance prospective if i design the package as per my collegue's suggestion., and which is best approch in the application development area.
    We are working on Oracle 10gR1 and the front end is .Net .,
    Regards
    Sekhar

    I don't think the performance are the biggest problem here. I do think however the code maintenance could be a problem. Especially if your app is large, then somehow logically grouping procedures/functions with similar requirements in packages and having these groups as subsystems/modules in your application is more flexible because as your app grows, you can add another subsystem/module and another package. If you create some fixed number of packages e.g retrieval, update, insert, delete, then what you'll do for a large application? Create package Retrieval1, retrieval2 etc? Seems quite illogical.
    So I doubt there are big gains/losses from pure perfomance point, but the biggest problem is maintainability of your code.
    Gints Plivna
    http://www.gplivna.eu

  • Name of the design pattern

    Hi
    I have been studying a piece of code somebody else wrote. I am wondering if this is the Factory Method design pattern that this represents. I am new to patterns and I would be very thankful for any suggestions.
    public class Creator {
         public Person create(String gender) {
              if (gender.equals(�M�)
                   return new Male();
              else if (gender.equals(�F�)
                   return new Female();
              else
                   return null;
    thanks in advance

    Yes, you are right this is a Factory Method creational design pattern.
    See http://en.wikipedia.org/wiki/Factory_method_pattern for more information.
    Ussualy class which is used to create instances of other classe called XXXFactory and implemented as singleton.
    Regards,
    Yevhen

  • Business delegate and Session facade design patterns

    Does any one tell me, what is the difference between business delegate and session facade design patterns.

    1. Session Facade decouples client code from Entity beans introducing session bean as a middle layer while Business Delegate decouples client code from EJB layer ( Session beans).
    2. SF reduces network overhead while BD reduces maintenance overhead.
    3. In SF any change in Session bean would make client code change.
    While in DB client is totally separate from Session bean because BD layer insulate client from Session beans(EJB layer).
    3. In only SF scenario, Client coder has to know about EJB programming but BD pattern no EJB specialization needed.
    4.SF emphasizes on separation of Verb, Noun scenario while BD emphasizes on separation of client(presentable) and EJB layer.
    Anybody pls suggest more differences ?

Maybe you are looking for

  • Not able to Open PDF in Email using CL_BCS

    Hello Experts, I am using CL_BCS to send an email that contains PDF as attachment. The PDF doucment should contain below text. "This is test system". Thanks. I am able to send an email that contains PDF as attachment. But while opening PDF document,

  • When Working With Your iMac Do You: Stand Up or Sit Down?

    Hi. New studies show that it's better for health and creativity to stand up for hours while working (with legs moving from time to time) vs. sitting down or is sitting down with a very good chair better than standing up if you want to have a clear mi

  • I tunes is locked

    Hey I totally need help. My daughter named her nano "Phoebe" and when I tired to charge it i tunes came up with a lock symbol on the bottom where it says how much time is left. I cant play any music under "phoebe" playlist but can play any other play

  • How to increase Heap size at runtime

    Hi, In my application i sometime require to parse large XML files,so for doing that i require to increase the heap size dynamically.Is there any way to do that ? Thanks in advance Gurpreet Singh

  • Mapping Techniques

    Hi, types of Mapping Technigues in PI 7.0/PI7.1