Please advise pattern for this situation

Hi all,
I plan to develop apps with thick client on the client side and using EJB on the server side, the EJB (Stateful Session Bean) will contain all the business logic and database connection.
The apps are divided into multiple modules. Those modules can be used independently, but they can also be used in an integrated manner.
So for example I develop Sales Invoicing module and Inventory module. If they're used together, each entry in Invoice will cut down the available Inventory automatically. But I also want to be able to sell Sales Invoicing module without dependency on Inventory module and vice versa.
Question :
1. Should I create separate Statefull Session Bean for each module (i.e EJBSalesInvoicing & EJBInventory) ?
2. How can I detect the presence of another modules so that I can call their methods ?
Any advice would be greatly appreciated
Setya

I am not sure if anybody can help you on designing the BUSINESS modules for Stateful SBs. But, we can suggest you the general overall architecture for THick Client Scenario.....
How do u plan to connect to the Server?....are yoou using BMPs /JDOs...or are writing the JDBC connectivity directly inside Stateful Session Bean( wrong Design)?

Similar Messages

  • Is there a design pattern for this situation?

    Hi,
    I'm making a survey engine. There is a Question class and a bunch of children of it (dropdown, checkbox, textbox, etc.). Now, correct me if i'm wrong, but I feel that this is a good case for inheritance. The problem I have is that Question needs to be initialized with parameters that the concrete question types have no business knowing about:
    //question constructor
    public Question(parameter1, parameter2, parameter3) {...}
    As a result, I am forced to require this as a parameter for all the concrete types since the Question requires these to be initialized:
    //checkbox constructor
    public Checkbox(parameterForQuestion1, parameterForQuestion2, parameterForQuestion3, parameterForMe1, parameterForMe2) {...}
    The checkbox doesn't directly use the first 3 parameters and I'd often prefer the the checkbox object doesn't have access to them. Because of this, i suspect a bad smell. Has anyone ever ran into this problem themselves? How did you solve it?
    Thanks,
    Dan

    tieTYT wrote:
    Yes, there's a bad smell, and it's coming from your proposed design.
    Separate the UI from your Survey and Question objects. Design the model and worry about the UI later.
    %You're assuming I didn't. Just because I'm using the word Checkbox and Dropdown doesn't mean I'm talking about UI components.I hope you didn't. If you actually did some analysis and came up with names like that for non-UI objects, your design is even smellier than I first thought
    A Checkbox has state like, "is box on right?" and "is checked". The Dropdown has state like, "currently selected option" and "list of options". The Question has state like, "am i invisible?", "what is my script", "am i enabled?". None of these classes have UI code in them. They just have names like this because, as you can see, there are fundamental differences between different question types that I use concrete children to sort out. With this setup I've already made a SWING and an AJAX frontend so I must be doing something right in the MVC department. No. I disagree that questions have states like "am I invisible?". That is irrelevant. A Question should not be aware that it is visible. Your design is very poor, I'm afraid, and it works by coincidence
    I'm making the assumption that you thought I wasn't doing this but if you still think this is a bad design, let me know. If not, please help me with my original question.It is, most definately, a bad design. Classes named for UI widgets, but that are not UI widgets? Terrible idea. Really, sickeningly awful. No offence.
    EDIT: And keep in mind this is a SURVEY engine. I specifically want to give the user of the library the power to specify whether their question is a Checkbox/Dropdown/RadioButtons/etc. In a normal application's code, the model wouldn't concern itself with details like, "Is this data going to be visualized as a checkbox?" But I feel that in this situation, the answer to that question actually does belong in the Model. But again, correct me if I'm wrong.
    Edited by: tieTYT on Oct 22, 2007 10:53 AMThe model should be entirely unaware of how it will be rendered. Siure, in this instance, you've decided to render a question as,say, a checkbox. What if you're generating a report on what questions there are? Presentation logic doesn't belong in the model, at all. You say "in a normal application" here, but, like it or not, this is a normal application. Everyone goes through a phase of thinking their own code is special, and different, and new, but it isn't. It's a pretty straightforward app as far as I can tell.
    Re-think your design. A class called Checkbox, that isn't a widget, stinks. Group UI concepts together, and use that as an abstraction. Dropdowns and radio buttons both present questions that can have exactly one correct answer out of a set. So you have a "MultipleChoice" question type. Then, in the UI layer, the decision can be made to render that question as a Dropdown or a bunch of radio buttons, without having to pollute your model with that.

  • Regex Pattern For this String ":=)"

    Hello All
    True, this isn't the place to ask this but here it is anyway, if you can help please do.
    Can anybody tell me the regex pattern for this String:
    ":=)"
    Thanks
    John

    Yep, cheers it's ":=\\)"
    public class Test {
         public static void main( String args[] ) {
              String s = "one:=)two:=)three:=)four";
              String ss[] = s.split( ":=\\)" );
              for( int i=0; i<ss.length; i++ )
                   System.out.println( "ss["+i+"] = {" + ss[i] + "}" );
    }resulting in:
    ss[0] = {one}
    ss[1] = {two}
    ss[2] = {three}
    ss[3] = {four}

  • I would like to download / backup my entire iPhoto library, but want to do so in a manner where each event is saved as a distinct folder.  Can someone please advise if / how this is possible?

    I would like to download / backup my entire iPhoto library, but want to do so in a manner where each event is saved as a distinct folder.  Can someone please advise if / how this is possible?

    See Terence Devlin's User Tip on exporting from iPhoto: 
                     Exporting From iPhoto  https://discussions.apple.com/docs/DOC-4921
    To write events to separate folders, use "File > Export" and select the subfolder format "Event Name". But that will only backup the photos and not your iPhoto library and all the work you invested in organising it.  For backing up, see:                    iPhoto and File Management

  • When or should XML be used and why for this situation?

    I am developing a 3-tiered web application (database, server, browser) that will use JSP to display a form where the user will enter their name and address information, JDBC for the connection to a mySQL database.
    When the user enters their name and address information on the JSP displayed using the broswer, the data when submitted will be placed in the database.
    How could I use XML for this situation? Is it really needed at all since I know it can all be done using only JSP? I am just wondering how using XML could help?
    Please give me any feedback you can...if you need more detail to what I am trying to do, let me know....
    Thank you so much in advance!!!

    Hi,
    XML is really useful for representing data from different resources. E.g. it can take a database and represent it as an xml document or it could be an xml document hosted on an external server. By using XML in the jsps, the jsp is completed oblivious to where the xml data came from i.e. either a database or an xml doc. Using XML provides a level of abstraction so that the jsp only needs to know the methods to access/retrieve data not how to access the data i.e. it doesn't have to worry about how to connect to the database, and create sql statements.
    In the situation described if you can be sure that the information that the jsp retrieves will be only from a database then you do not need to use xml, otherwise by using xml you adhere to good-old object design principles.
    There is a paper on using xml and jsp see:
    http://java.sun.com/products/jsp/html/JSPXML.html
    Hope this helps.

  • HT4623 when updating my iphone 4s to ios6 phone got stuck now i can not do anything please advise me regarding this...

    dear sir ....i try to update my iphone 4s from ios5.1.1. to ios6...during updating my phone got struck....please advise me regarding this matter...thank you..

    so when I connect my phone ... I get this:
    So this means:
    New hardware found: the driver for your Apple Mobile Device needs to be installed:
    1) search for drivers and install (recommended)
    2) try again later
    3) Do not give this message again for this machine
    So offcourse I take the first but it finds no driver on my computer.
    So to summarize, on my phone there is this:
    and my computer doesn't won't to recognise my phone...
    Can somebody please help me, because I need my phone to work and it is sunday so I can't go to a store to fix it?
    Kind regards,
    Leen

  • The decline button is not showing up on IOS 7 iphone 5(when phone locked). could you please advise me on this?

    The decline button is not showing up on IOS 7 iphone 5(when phone locked). could you please advise me on this?

    Is it because the new itunes looks different.
    View > Show Sidebar
    Then it should work just the same as on your old computer.

  • I accidently removed my clash of king game from Game Center, but my profile is still there and i want it back. Any solution for this situation?

    I Accodently removed mu Clash of King game from Game center, but my profile is still there, I want it back.Any solution for this situation?

    Install the game again.

  • HT204380 I am using Ipad Mini, wish to download facetime, please advise me in this regard

    I am using Ipad Mini, wish to download facetime, please advise me in this regard

    FaceTime is not  available on devices purchased or used in certain countries, including Saudi Arabia and the United Arab Emirates. This is by government decree. The FaceTime app can't be downloaded or installed on these iPads.
     Cheers, Tom

  • Is there a design pattern for this?

    I'm looking for a solution to a design problem I have.
    For a restaurant booking system I need a number of different opening times describing when you can and cannot book. These opening times are essentially Jodatime Period objects. There's a set of opening times spanning a week and these are repeated for every week (a default set of opening times) however it's possible to override these opening times say for a specific day.
    The domain model would be something like a Restaurant class holding 2 Lists of OpeningTime objects one for defaultOpeningTimes and the other for overiddenOpeningTimes the overidden ones get used if they exist for the requested time period. However the database model would be a bit messy as I'd have 2 lists mapping to the same table (OpeningTime). Is that a good idea? Perhaps there's a design pattern for this, if someone could point me in the right direction I'd be very grateful, or perhaps this is the best solution? Thanks!

    jduprez wrote:
    But why do you put the logic in the database too (I'm no DB expert and I didn't know these concepts until I read your post, but that's what a dynamic view based on derived values looks like to me): performance (1 round-trip instead of two)?Hi jduprez. Long time no speakee.
    I guess part of it is that I spent many years as a DBA and modeller, and really appreciate what it's taught me about design. Also, databases are (or should be) designed from the ground up to provide data-directed requests optimally, and include all sorts of nice stuff like transaction handling that aid consistency, as well as speed.
    That said: I HATE SQL. Think Coliseum, with that emblazoned in 60-foot high letters around its walls, and it might come close to just how much I hate that so-called "language". I hate its form; I hate it's inconsistencies; I hate the fact that something like what OP is trying to do is NOT an easy task (and might involve the creation of a table that simply contains Dates, just in order to satisfy Boolean logic).
    However, once you work it out, a database view (at least from the database's standpoint; JDBC I'm not so sure about) is just like any other Table - and that I DO like.
    Programs are good at processing parameterized (ugh) temporal information; databases are good at persistence and high volume. Those two may meet at some point, but I reckon it's going to take another Codd (or Joda) before it does.
    - that's clearer to 90% of the dev team (my biased numbers, based on 50% of Java developers having decent knowledge of SQL and much less than that having the advanced SQL knowledge which I rank your suggestion at)Sounds to me like you'll get the solution that matches the skills you have then. Is that what you really want, if a better one is available?
    - that doesn't require investigating the if of your suggestion (JDBC support)Agreed, but only because my JDBC knowledge isn't what it could be. I'd also be surprised if it doesn't support access to a named view, since they were designed to be equivalent to Tables.
    - the Op is using DAOs, so it's possible, if profiling does show this is hampering performances, to change that with no impact on the client code that calls the DAO.There's no doubt that a database solution is much higher level than a programming one; but, as I said, it's what they were designed to do. And tinkering around with program optimization has the feel of a "hacker's solution" to me. Not that there's any particular problem with that - I do it quite often when I have no control over my source - but I also try to keep in mind what the "actual" problem is.
    Winston

  • IOS 7 very slow, i have many problem , exemple  download documents , typing doc to go .   Very slow, sometime no response , please help us for this error

    IOS 7 very slow, i have many problem , exemple  download documents , typing doc to go .   Very slow, sometime no response , please help us for this error,

    spacepilot wrote:
    i live in the WS10 / 0121 area and have been having similar problems. i have an up to 20mb services, but up to a month ago connected at 4800, then my line went dead for 6 days, and all indis could do was send me  new router, which came the day after my line was restored, but had dropped to 2418 and remained so for the past 3 to 4 weeks, then i dropped to 1963 yesterday, and 729 today.
    all speeds are far lower on my upto 20mb than they where on my upto 8mb link.
    foegot to add, i reported the problem via the report a problem link, which hopefully will be red by someone with  a firmer grasp of english that the normal call centre staff
    welcome to the forum    why don't you start your own subject and post the adsl stats from your router and also run btspeedtester and post the results and someone may be able to offer assistance
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Firefox 3.6.15 not play youtube videos show blank video frame but other browsers play perfectly please help me for this matter i have already updated adobe flash player.

    Firefox 3.6.15 not play youtube videos show blank video frame but other browsers play perfectly please help me for this matter i have already updated adobe flash player.

    Answers in this forum have shown different things have worked for different people.
    For some clearing YouTube cookies and the cache solved the problem. For details of how to do that see https://support.mozilla.com/kb/Deleting+cookies and https://support.mozilla.com/kb/How+to+clear+the+cache
    Others had to go a step further after deleting YouTube cookies and block YouTube from saving cookies. In the Tools menu select Options to open the Options window. Go to the Privacy panel and make sure it is set to "Use custom setting for history". Click the Exceptions button, type in http://www.youtube.com and click on Block
    Another option is to disable hardware acceleration for Flash. To do that right-click on a Flash video, select Settings, go to the first tab of the settings for the option to enable/disable hardware acceleration for Flash. This is something recommended by YouTube for those having problems - http://www.google.com/support/youtube/bin/answer.py?&answer=1209379

  • What is the best design pattern for this problem?

    No code to go with the question. I am trying to settle on the best design pattern for the problem before I code. I want to use an Object Oriented approach.
    I have included a basic UML diagram of what I was thinking so far. 
    Stated simply, I have three devices; Module, Wired Modem, and Wireless Modem.
    In the Device Under Test parent class, I have put the attributes that are variable from device to device, but common to all of them.
    In the child classes, I have put the attributes that are not variable to each copy of that device. The attributes are common across device types. I was planning to use controls in the class definition that have the data set to a default value, since it doesn't change for each serial number of that device. For example, a Module will always have a Device Type ID of 1. These values are used to query the database.
    An example query would be [DHR].[GetDeviceActiveVersions] '39288', 1, '4/26/2012 12:18:52 PM'
    The '1' is the device type ID, the 39288 is the serial number, and the return would be "A000" or "S002", for example.
    So, I would be pulling the Serial Number and Device Type ID from the Device Under Test parent and child, and passing them to the Database using a SQL string stored in the control of the Active Versions child class of Database.
    The overall idea is that the same data is used to send multiple queries to the database and receiving back various data that I then evaluate for pass of fail, and for date order.
    What I can't settle on is the approach. Should it be a Strategy pattern, A Chain of Command pattern, a Decorator pattern or something else. 
    Ideas?

    elrathia wrote:
    Hi Ben,
    I haven't much idea of how override works and when you would use it and why. I'm the newest of the new here. 
    Good. At least you will not be smaking with a OPPer dOOPer hammer if I make some gramatical mistake.
    You may want to look at this thread in the BreakPoint where i trie to help Cory get a handle on Dynamic Dispatching with an example of two classes that inherit from a common parent and invoke Over-ride VIs to do the same thing but with wildly varying results.
    The example uses a Class of "Numeric"  and a sibling class "Text" and the both implement an Add method.
    It is dirt simple and Cory did a decent job of explaining it.
    It just be the motivation you are looking for.
    have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • I'm unable to play game in hp 15-r009TU.. what can i do for this. please help me for this

    i'm unable to play game in hp 15-r009TU.. what can i do for this. please help me for this

    Hi Madhuama, I'll try to give you a hand with this. First off, what OS is running on your notebook, what game are you attempting to play, and how is it not working? Is it not installing?
    Thanks,
    Fenian Frank
    I work on behalf of HP

  • Do I use the Brdige pattern for this problem ?

    Hello
    I'm making a music mixer for mobile phones. For the canvas, i divided it up in tiles, to fill
    up with .png images if you want to place a sample in that specific tile. But if you have a phone with no colors and your screen is not big enough, the image is almost all black. So I want to create a different class, to only show a letter or a simple symbol if you can't handle the .png well.
    I read about the bridge pattern, where you encapsulate the implementation in an abstract class and seperate it from the base class with the abstractions. Should I use this pattern for my problem ? I have some doubt because I have multiple implementations (color vs non-color) but I don't have multiple abstractions (a tile to fill up with a symbol or picture).
    Are there other patterns that are more suited for my problem ?
    What about the implementation? Should I see the implementation as only producing the image or symbol, or should i see it as the whole canvas, with the tile system?
    For example, now the tiling looks good on most of the targeted phones. But what if the next generation of mobile phones has a screen with very different dimensions. Wouldn't it be better to incorporate this also in the implementation ?
    Thanks

    What are you trying to do when you say "When I put the password for my apple ID into icloud- it keeps reverting to another password"?
    Where are you doing when you try to enter your password?

Maybe you are looking for

  • Can I share an iTunes account with multiple devices?

    I had an iPhone 3GS. Just upgraded to an iPhone 5C. I'd like to save the 3GS for our daughter to use as an iPad Touch. I realize that I'll need to wipe the 3GS clean and start over with new apps for her. I have a few questions: Can I use my same iTun

  • Flash Player is NOT working in Firefox

    I have installed Flash Player recently on Windows 7. It is working properly i.e. playing vidoes on IE & Chrome but not in Firefox. I have updated both Flash Player & Firefox but it is still not playing any videos. Please solve this for me.

  • Opening pdf appln from forms 6i when clicking on a blob field-extremely urgent please

    I was browsing through the discussion forum for my requirements and found the following code for opening a column value (a blob field) into an application. I wrote this following code in 'when-mouse-doubleclick' for the blob field in question, in for

  • How Do I Get Rid of all these Pop-Up Windows?

    Somewhere along the line, something seems to have added itself to Safari, so now every other new window is a sales site.  For example, just in the last couple of clicks I've had two different pop-ups for Mac cleaning utilities (MacKeeper is CONSTANTL

  • LAG WLC 5508 7.0.235 and Nexus 7K 5.2(3a)

    I can't get the WLC to form a LAG, the 5508 has 2 SFPs direct to Nexus 7k.  Enabled LAG and rebooted.  The 5508s port 2 just stays Link Down in WLC. hostname n7k-01 int port-channel 31 vpc 31 int eth1/12 description WLC-5508-Port1 switchport switchpo