I have an UserDAO and an CountryDAO object. When I insert an User object into database, first I must check if the Country for that user exists in database and throw an specific exception if Country object is deleted . If I check this in insertUser() method from UserDAO object, I must get a ...
473 byte By
amateca at 2007-9-29 18:14:53
Hi all,I have a little doubt about getting a mid-term on defining VO's. Suppose we have an EmployeeVO with about 50 atributes. This Object appears in many, many views of the application and in each of them it shows a different subset of attributes. Wonder which would be better: always send the ...
Calendar Types - Graphical Yearly, Graphical Monthly, Textual Yearly, Textual MonthlyWhen a user logs in he should get one of these views.Calendar is associated with Events.Events is associated with EventTypes.So I think the Objects involved would be, Calendar, Event, EventTypes,I am not sure ...
Calendar Types - Graphical Yearly, Graphical Monthly, Textual Yearly, Textual MonthlyWhen a user logs in he should get one of these views.Calendar is associated with Events.Events is associated with EventTypes.I think the Objects involved would be, Calendar, Event, EventTypes,I am not sure How ...
Hi,I am caching some info (updated twice a month in the database) in a singleton cache object.My application runs on a weblogic cluster. Each instance of the cluster has their own singleton object and hence when the cache in one instance is updated, the other one is out of sync.I had been ...
110 byte By
udayk2ka at 2007-9-29 18:33:51
can i design an application based on MVC without having a controller servlet. If so, how?Thanks.
90 byte By
Suhas-Sa at 2007-9-29 18:34:47
I want to know if there is any framework that DOES NOT follow the MVC architecture.
773 byte By
hesinoa at 2007-9-29 18:37:43
I am trying to implement a user based web application that allows users to choose what type of user they are: ie. Engineer, Mathematician, Programmer, etc.Each user has specific actions connected to methods and specific variables and can choose to have several different usre types associated ...
277 byte By
_edoA_a at 2007-9-29 18:44:56
Hi,I hava some questions about the DAO-pattern.Do I need for every client that access the data-source over the DAO a new Trasfer/Value-Object?Is the DAO-Object a threadsafe singelton object, or do I create for every client a new DAO-Object?--
Hai everybody,I am new to J2EE. I am trying run this code but I am getting errors. somebody can u help me out.this is the code:it is in c:\j2sdkee1.3.1\example1;import java.io.Serializable;import java.rmi.RemoteException;import javax.ejb.CreateException;import javax.ejb.EJBHome;public interface ...
hi All,We have designed the access to the persistance layer thru DAO's in our application, but the application data is growing on a daily basis , hence the query retreival is becoming slower and sometimes is giving out of memory exception.We have used the following patterns in our application ...
Could you recommend which pattern would be nearly ideal for performing searches?Tks:D
How can the Delphi client application invoke EJB methoad?If can , please show me an example . Thanks
226 byte By
jboonsa at 2007-9-29 19:19:03
Dear reader,I would like to know if there are design patterns which cannot be implemented in Java and if there are, why this pattern or these patterns cannot be implemented.Thanks in advance,Jochen.
hi, i'm kinda new to UML diagramming and i hope you can help me in this...i have already drawn the use case for my project scenario, a class diagram, sequence/collaboration, activity diagrams.my problem is how do i start with a state diagram...i know it's about describing one (mebe more but ...
What is the real difference between Aggregation,Composition and Containment?How can we write code in Java to represent Aggregation and Composition?How it's different from C++ implementation?
Hi there, i dont know whether i am in the right forum or not, but the problem which i have is how to generate DFD for Java programs using code. Is it possible by using any Api , can we generate DFD for java .class files? , or we can only generate DFD for source files. If so, then how can i get ...
I would like to know what would be the advantages/disadvantages in storing value in HashMap [like key, value] parameters, rather than storing in different tables.The information for example could be users personal information.
Hi In my application I'm using Data Trandfer Objects for trasfering data between client and server. It's only used for travfering data and as a client side buffer. Shall I keep all the attributes with public access specifiers?Is it against any concepts?Example:public class ResourceDetailsTO { ...
2255 byte By
dawuada at 2007-9-29 19:45:26
I was wondering if someone can help me answer this question? I am going to have this class that will be used by the Beans to complete a transaction. Because I have several Beans that all need this one particular class to complete a transaction, I was wondering if it would be good to create this ...
Hello!I'm a working java professional, but has taken on some courses on the local University.Of course there is a difference in how things are solved in theory and practise, but it makesme wonder what the "best" solutions to some problems are...Consider the following structure:class ...
1891 byte By
hattonsa at 2007-9-29 19:51:23
A couple years ago I was given the impression that in the future all good software design would be based on event/listener patterns. This was especially true in Java, as I understood things. I've discovered in the process of trying to realize that goal is that I often follow my code to the ...
my programming skills are pretty much limited and as most beginners i was coding simple things by build and fix method, but wanna try to do it properly so i'm looking for help. i've been trying to design simple Connect4 game and as i'm coding in java i taken oo aproach. i'll explain exactly ...
Hi,I am completely new to design patterns and J2EE so any help would be useful.I have a basic web page with an embedded flash movie which communicates with a single servlet.The servlet is basically a big if...else statement on the request params from the flash. Each if...else calling an ...
1664 byte By
jdupreza at 2007-9-29 19:56:01
Hello,Could anyone help me with the "realize" relationship in UML/Rose?.While maintaining a design specification in UML for a J2EE application, I found a lot of occurences of a "realization" relationships, that I have trouble understanding. With not much experience in UML, it's the first time ...
Hi,I want to create a report with information about friends. I have a class like this:public class friend(){Date born;Vector phones;String name;.....} I have a collection of friends and I want generate a report with some of them. I want to select those friends that verify some restrictions like ...
Hi,I am a new J2EE developer. I wrote a J2EE application using JBuilder. Now, I want to deploy it on IBM Websphere, that comes bundled with WSAD. Do I need to make any changes in my code or will it work fine? I did not use any vendor-specific services in my code.Thanks.
Dear experts,I have developed a System which now only can be use through Browser, in other words,a WEB application for the System has developed which I use MVC pattern in itnow,I should develop a client software for some local customers to use system,but I have not any experiences in developing ...
When designing applications, it is a good idea to incorporate two classes User and UserInterface in the UML diagrams and analyse how the user interacts with the application. Your comments on this are invited.
When using the Strategy pattern, a Context type will by responsible for choosing which strategy to instantiate and call. This provides for an elegant solution when used in conjunction with a Swing GUI where the strategy to be used is determined by the user (and communicated via the appropriate ...
I am looking for articles or books that describe if/how to apply the decorator pattern for the purposes of caching.
we have Reporting tool to be developed with jsp,servlet,java,html . The main purpose is to provide Filter Screen in first page and based on selection provide reports from DataBase. Filter Screen is dynamically populated from DB.Can anyone Suggest any design for this kind of ...
I need access a resource bundle file of my web project by a session bean into EJB Project. Some tip?Thanks!
Hi All, what is your opinion about combinating those patterns in one web application(ejb2.1,struts, perhaps+hibernate)?Actually I think ValueObject could be removed ,but this is "performance vs data consistency" in my opinion..... DomainObjects are object "bound" to specific action (or bussines ...
Hi.I am trying to write a simple J2EE application that would use Entety EJB with bean persisatance. I have downloaded driver from the www.mysql.org, copied it to the lib/system directory and modified J2EE_CLASSPATH in bin/userconfig.bat. I am using reference implementation server and with ...
Hi All,I've 1 question which is point 4 but you need to have a quick scan on pts 1,2 and 3in order to see what I'm trying to ask. 1M Thanks.1. switch statementclass switchStatement{public switchStatement(char rule){switch (rule){case 'A':applyRuleA();case ...
150 byte By
ohadasa at 2007-9-29 20:27:53
Hello , I have a EJB 2.0 , J2EE Patterns ,JAVA and websphere job interview , can you please send me questions and answers?THANKS
I'm wondering, what's the difference from having a singleton class than having a class that has all static methods? I mean, in the case of the singleton, you have to first retrieve the instance, then work with it. In the case of a class with all static members, it's pretty much the same, ...
What factors do one need to watch for while designing online transaction processing system (around 450 transactions per second). Thanks
Hi,I've a doubt regarding the use of <<extends>> in usecase. Suppose we are creating usecase diagram for a screen for entering personal details(usecase name - Set Up Person). That screen contains a button for another window , let it be company details for the person(usecase name - ...
151 byte By
flam70a at 2007-9-29 20:47:59
I would like to use factory pattern and i wonder if the factory class is a singleton or not ?What is the best way to do it ?THANKS
My application isn't distributed. I'm not using EJBs. For this case, is there any advantage of using data transfer objects when implementing the DAO pattern? I'm thinking of just passing the business object directly to the DAO to have it populated.Mike
368 byte By
Urmassa at 2007-9-29 20:53:58
Can somebody help me by writing this small program:Create trivial J2EE webapplication (WAR-file) with next technical requirements:- Application contains exacly one servlet- Servlet returns to GET referens answer "Hello World!"- Application deployb at least to Tomcat 4.1.29 servlet ...
Hi!The only way to use the Session Facade Pattern, is if I use EJB for Persistence.Is valid to do this?:I use Ejb for simple update, insert querys. From my business delegate I call the Session Facade Layer, and from this I invoque Entyties for persistence.But if I have complex querys, is ...
Hi!The only way to use the Session Facade Pattern, is if I use EJB for Persistence.Is valid to do this?:I use Ejb for simple update, insert querys. From my business delegate I call the Session Facade Layer, and from this I invoque Entyties for persistence.But if I have complex querys, is ...
Hi, In regards to the direction of the arrow for a Dependency, the arrow is pointing at the independent thing.The base of the arrow is connected to to dependent thing. I have seen diagrams that seem to do both and would appreciate clarification. Thanks a bunch!
I'm sure this has been discussed before, but i have not been able to find a solution for this problem. I am working on a system that stores data objects in a relational database. The data objects A are arranged in a parent/children relationship, data objects B reference instances of A. Since i ...
Given the below pt 1. (polymorphism) can be replaced by pt 2. a Factory Method pattern.Question: Whenever we have a polymorphism situation like pt 1, should we 'automatically' use FMor another way is in general what is the number of concrete subclasses that would triggerthe use of FM? at ...
I notice both the patterns are DTO.What the deference?
In our database, about half of our tables are considered being as "referential data". As such, we load data in memory when we start our AppServer, and then use it read only.In a future release, we'll have to give the possibility for an admin to change the data dynamically.What is the best way ...