Should DAO check for foreign keys existence?

741 byte By florinmarcusa at 2007-9-29 18:11:30
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 ...

Doubt in Value Object Designing Pattern

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 ...

Designing Objects-Your Ideas?

472 byte By JavaDanDBDa at 2007-9-29 18:24:22
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 ...

Designing Objects

478 byte By JavaDanDBDa at 2007-9-29 18:24:27
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 ...

Singleton Cache

669 byte By vibha131a at 2007-9-29 18:28:22
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 ...

MVC without ...

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.

Framework other than MVC

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.

User Types

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 ...

the DAO-pattern

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?--

basic problem!!

761 byte By pydipati_prk2001a at 2007-9-29 18:48:35
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 ...

Dealing with large databases - Query retreival

651 byte By kadabaraghua at 2007-9-29 18:53:44
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 ...

Ideal Pattern For Searching

106 byte By JavaDanDBDa at 2007-9-29 19:06:25
Could you recommend which pattern would be nearly ideal for performing searches?Tks:D

How can the Delphi client application invoke EJB methoad?

115 byte By kevinGaoa at 2007-9-29 19:06:35
How can the Delphi client application invoke EJB methoad?If can , please show me an example . Thanks

Are there design patterns which cannot be implemented in Java?

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.

state diagram: how to start?

621 byte By gildan2020a at 2007-9-29 19:20:53
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 ...

Aggregation ,Composition AND Containment

198 byte By Shylesh.Kurupa at 2007-9-29 19:32:34
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?

Reverse Engineering Java program

448 byte By Mona_Yadava at 2007-9-29 19:35:23
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 ...

HashMap Approach?

240 byte By JavaDanDBDa at 2007-9-29 19:38:48
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.

DTO with attributes having public access.

524 byte By Jobinesha at 2007-9-29 19:42:46
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 { ...

To use a Caching methodolgy or not?

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 ...

Which would be the better approach?

2366 byte By ronniebahlstena at 2007-9-29 19:48:01
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 ...

Event Listeners and GOTOs?

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 ...

how to design a simple game?

3088 byte By Spirytus_a at 2007-9-29 19:51:42
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 ...

New to patterns

1206 byte By maskellpa at 2007-9-29 19:54:53
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 ...

Realization vs Generalization

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 ...

Data selection and report generation

850 byte By outrillaa at 2007-9-29 20:02:33
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 ...

Porting from JBuilder to WSAD.

291 byte By tushar3j79a at 2007-9-29 20:03:52
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.

how to apply patterns in Java desktop system

440 byte By TyroneChena at 2007-9-29 20:10:33
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 ...

UML diagrams

215 byte By vpidaparthia at 2007-9-29 20:14:11
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.

Strategy Pattern & Context

856 byte By baruch_wa at 2007-9-29 20:15:09
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 ...

Decorator pattern, caching

129 byte By scsulliva at 2007-9-29 20:16:52
I am looking for articles or books that describe if/how to apply the decorator pattern for the purposes of caching.

suggest Design

325 byte By trivedirakesha at 2007-9-29 20:18:51
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 ...

How to get resource bundle from session bean?

128 byte By sergioflora at 2007-9-29 20:19:58
I need access a resource bundle file of my web project by a session bean into EJB Project. Some tip?Thanks!

DomainObject+ValueObject+SessionFacade

542 byte By vladislav.vla at 2007-9-29 20:20:07
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 ...

J2EE RI and MySQL, JNDI problems

985 byte By alexeipaba at 2007-9-29 20:21:20
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 ...

DP 101: switch statement->Strategy->StrategyFactory-->alternative?

10200 byte By PaulPhuoca at 2007-9-29 20:21:25
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 ...

JOB INTERVIEW

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

Question on singleton

717 byte By ematters2003a at 2007-9-29 20:43:50
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, ...

Designing Online Transaction Processing System

149 byte By Rahul_2001a at 2007-9-29 20:45:54
What factors do one need to watch for while designing online transaction processing system (around 450 transactions per second). Thanks

Usecase diagrams with <<extends>> dependency

846 byte By Jobinesha at 2007-9-29 20:46:05
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 - ...

Is factory a singleton

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

DAO: DTO necessary?

269 byte By magic886a at 2007-9-29 20:51:43
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

small Program

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 ...

Session Facade and Business Delegate Pattern

792 byte By denise_1975a at 2007-9-29 21:01:35
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 ...

Business Delegate and Session Facade Pattern

792 byte By denise_1975a at 2007-9-29 21:01:37
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 ...

Dependency Relationship Notation

275 byte By cvelez69a at 2007-9-29 21:02:49
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!

Referential Integrity in Data Objects

932 byte By Night-Stalkera at 2007-9-29 21:07:00
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 ...

DP101: polymorphism and Factory Method

2445 byte By PaulPhuoca at 2007-9-29 21:07:56
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 ...

What is the deference between DAO and VO

68 byte By windyboycna at 2007-9-29 21:09:40
I notice both the patterns are DTO.What the deference?

Changing referential data

340 byte By spenhoeta at 2007-9-29 21:11:01
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 ...