MVC model: JavaBeans vs. EJBs

310 byte By Smurfaa at 2007-10-2 13:15:20
I have to design and implement a web site for a Travel Booking Agency where users login, book trips and so on...My question is how to design it in the sense of whether use JSP-Servlets-JavaBeans or EJBs. I quite miss the idea when to use the one and when the other in more simpler cases...10x in ...

Looking for Alternative Design solution for Java Beans(Domain Object Design

383 byte By munn_2000a at 2007-10-2 13:17:23
Hi All,I am looking for alternative Design solution for Java Beans(regular beans). Right now I am using Java Beans to store the data that comes from DAO object. Setting this databean into request scope to use on JSP page. Now I want to change this databean design to Domain Object Design. Can ...

what is rule engines?

8 byte By at 2007-10-2 13:17:43
?

How to setup a (ui) class in a readable way ?

1125 byte By buggymana at 2007-10-2 13:20:24
I'm pretty new to java (and java's OO model) and i can't really think of a nice way to do this :I'm creating a UI, a JFrame which has a JTabbedPane (with 8 tabs)and each of these 8 tabs contains either a few listboxes or a pretty complex form (think: 8 textboxes, dragdrop lists, buttons, ...

Using Objects to Initialize Static Fields: Good or Bad

1773 byte By ktm5124a at 2007-10-2 13:21:59
I have a Command interface and a bunch of Commands that implement it (i.e. CmdJoin,CmdQuit). These Commands' settings change at runtime (i.e. required access levels, String identifiers). I don't want to have to store an instance of each Command in a database to save their settings , so ...

Need design pattern advice

682 byte By cinoda at 2007-10-2 13:22:53
HI all,Im trying to create a single router application that routes transactions to a number of Processing applications. Both applications reside on different machines. Upon system start up of the Processing application, the router will be notified and will register this application to its local ...

Copy Constructor versus copy() methods

939 byte By Tuckya at 2007-10-2 13:24:13
Hi AllAm interested in some views on copy constructors versus copy methods. I work with a group of programmers many of whom diligently use copy constructors instead of copy methods. I think this is due to reading Bloch's views on the clone method and advocation of using a copy constructor ...

My version of (replacement for?) MVC - thumbs up or thumbs down?

2875 byte By Drake_Duna at 2007-10-2 13:25:09
I would like to get opinions on whether the following design approach has potential. I use MVC and command pattern terminology here.The model is a model. What more needs saying? It does not know anything about anything else. It just sits in its room listening to The Cure until someone comes ...

Singleton, Concurrency and Performance

4014 byte By blueboya at 2007-10-2 13:26:29
Dear all,Below is part of the code of my Singleton ServiceLocator:public class ServiceLocator {private InitialContext ic;private Map cache;private static ServiceLocator me;static {try {me = new ServiceLocator();} catch(ServiceLocatorException se) ...

J2EE design question: zipping files in memory vs hdd

609 byte By fastolfa at 2007-10-2 13:28:32
It is commonly known to be a bad practice to use the java.io package in the J2EE world. I'm currently architecting an J2EE app that is supposed to fetch a couple of files from an external system (web service interface) and make a zip file including all the files for further processing. I'm ...

ValueListHandler, Large Results and Clustering

469 byte By djeleya at 2007-10-2 13:29:07
Has anybody got experience of using the ValueListHanlder pattern with a session facade and potentially very large query results, e.g. millions of results (even when filtered)?How did this solution scale with many users each with a stateful session bean containing all of the results? How did ...

Best structure to use...class getting too big

1093 byte By jneaua at 2007-10-2 13:30:28
Need a little advise.I write a poker tournament management application. In the app, I have a "Player" class to track info on a player including their name, email, phone, etc. A also use that class to track information that changes dynamically throughout a tournament, such as:- money paid in- ...

Classes that reference each other

697 byte By jneaua at 2007-10-2 13:30:29
In my app, I need to track where people are sitting.The way I stupidly did it at first was as follows:"Person" has a "Table" and "Seat" attribute."Table" has multiple "Seats"."Seat" has a "Person" attribute.All seating is done through a class that handles the connections.What is the best way to ...

Design question - implementing permissions

626 byte By ssv45324a at 2007-10-2 13:35:22
We have to implement permissions in our application. Which method do you gurus suggest?a) Checking if a user has the permissions to do a certain action and enabling/disabling/hiding the input control accordingly.The drawback i see in this approach is that a user who want to hack the application ...

what is the use of the setter dependency injection in Spring?

571 byte By keepswimminga at 2007-10-2 13:42:47
What is the use of the dependency setter injection ?In a database driven app, I retrieve results, use the javabeans set methods to save stuff in javabeans and then call get on it.What is the use of having something set externally from a xml already ?Can someone provide an example when the ...

Generics and prototype patter

3781 byte By BigLebowskia at 2007-10-2 13:43:20
Hello, I'm trying to do the following (see C# example code): http://en.wikipedia.org/wiki/Prototype_patternThis is (bad) a try in my code:import......public class DataFactory{private DataFactory(){}private static HashMap<Type, Abstractdata><?>> instances = new HashMap<Type, ...

Different types of Polymorphism

165 byte By HowardDana at 2007-10-2 13:44:54
What are different types of polymorphism in Java OOP? I read overriding is runtime. Please provide code sample as how overriding can happen at runtime.

what is the difference between a data object and a business object?

27 byte By nizzails11a at 2007-10-2 13:50:19
thanks for any input

PLEASE HELP ANSWER THIS QUESTION... I HAVE INTERVIEW THIS MORNING

693 byte By balogiza at 2007-10-2 13:51:59
Another object oriented application deals with roads. The application has a global list object containing Road objects. When the RoadNetwork class requires a particular road it searches through the global list until it finds the road name that matches. The City class also requires roads by ...

GUI Design Question

5824 byte By marek.ja at 2007-10-2 13:53:24
Hello, I wonder if you can give me some advice...I created a small application about 3 years ago now and I thought I would give it a re-write. I am building the GUI part and I'm torn between two ways of implementing it:-One way of building this GUI is by declaring all its controlling ...

Visitor Pattern - Help Needed

122 byte By murlia at 2007-10-2 13:54:57
In a tree of nodes how can one use Visitor Pattern. If possible please refer some sample code for helpThanks

Architecting multi-threaded applications in Java

8601 byte By WorkForFooda at 2007-10-2 13:57:59
Please let me apologize up front for the length of this post. I feel that if someone is willing to take their time to respond (and I hope someone will) I need to respect their time by providing a reasonably complete posting. If this is too much for you or you are time constrained, please feel ...

How to Design this Class while Reding a Csv File.

16178 byte By rajpuniaa at 2007-10-2 13:58:24
i want to make this more Design orinted. This code is for reading A csv file and scnning it for Duplicate data in that Csv file.public Vector upLoadCsv(String csvFile) throws Exception {boolean flag =false; Connection conn= null; PreparedStatement stmt= null; Vector upload_data=new Vector(); ...

Web database application design examples wanted

844 byte By NemomeNa at 2007-10-2 14:04:07
Hi! I抳e written a couple of smaller web database applications in Java but I抦 not completely satisfied with my design, especially where and how to put the database code. Now I抦 looking for small open source examples of good design of web database applications in Java. I would appreciate if you ...

Inherit Features From Two Concrete Classes

227 byte By sathyana at 2007-10-2 14:16:36
Hi ,Greetings.How should i use the features from two classes ? That is Class A should use features of Class X and Class Y.How should the Design Be ?Thanks and Regards , SATHYAN .

dynamic number of functioons - need for a pattern

1786 byte By bestama at 2007-10-2 14:22:13
Hey all!I'm currently developing web based game, with a quite original core system. You can skip the details to the point who brings me troubles.In this game, players sends units in the "wolrd", to fetch gold packs. Players have no real-time view of what's happening to their units; instead, ...

Globalization of Dates

337 byte By ssv45324a at 2007-10-2 14:30:08
The application we are developing is used from multiple countries. We would like to display the dates according to the country a user is accessing from. One way we could think of is to assign the user the country he is from in the database and then display the date accordingly. I am wondering ...

problem about translating c++ to java

14501 byte By tailianga at 2007-10-2 14:32:03
I have a problem about translate c++ code to java code.someone says use the JNI,someone just trans it directly and someone use jobject or jint..etc...I have no ideal about choicing which way.and tihs code is what i want#ifndef SC_BIT_H#define SC_BIT_H#include ...

Can two ArrayLists be used on a single JSP?

439 byte By simmyka at 2007-10-2 14:32:47
Hello All,I am facing a problem in displaying data on JSP.The scenario is as follows:I m retrieving some data to display from one DTO and some data from another DTO and adding them to an ArrayList. now the main problem arise whn I have to return two arraylists on a single JSP.How I can use two ...

create different instance ?

435 byte By PuneetSrivastava_Lko_Indiaa at 2007-10-2 14:33:20
on the basis of some values(1,2,3,4..) i hav to create different objects ..if any one can suggest me any way to do it apart from..IF ELSESWITCHthe list is long so i can't create instances and store them in hashtable or any other list..is there any design pattern for ...

Any pattern or nice solution to this ...

1022 byte By jfreebsda at 2007-10-2 14:41:26
I have an app which goal is to model UML graphically and generate code from models.My doubt is explained next:I have the graphical base component where UML components are drawn. For example Class Diagrams, Interfaces, just the same than Rational Rose. If I want to create a Class on the ...

Types of dependency injection.

573 byte By Hi_i_am_Amita at 2007-10-2 14:41:37
Hi,I wanted to know some details about difference between setter and constructor based dependency injection(IOC)I didnt understood the foll things :1. "setter based IOC is good for object that take optional parameters and objects that need to change their parameters many times during their ...

Will Struts or any other framework work for this?

554 byte By tasneem93a at 2007-10-2 14:42:37
Here is the bird's eye view of the project. We have data coming in from different sources in different format. We need to process this data into our my own standard format and load them into database. We built our own Java classes to solve this but now we have too many classes and maintaining ...

Systems Analysis

266 byte By nantucketa at 2007-10-2 14:49:00
I'd like to learn more about systems analysis. What is systems analysis... Are there any good books or links one would recommend I look at.. I'm interested in it as it applies to the process of software development of course. Thanks for any feedback.

High performance in memory database supporting C++ and JAVA

592 byte By Huntera at 2007-10-2 14:52:49
Hi,I am considering to build a Java compatible In memory database to speed up the application of JAVA. We have now the C++ version of the database, named MTDB, which is hundreds of times faster than phisical database. The in memory database runs on solaris, linux and windows system. MTDB ...

abstract class method polymorphically using constructors?

1012 byte By arabotha at 2007-10-2 15:08:46
how can i have a method defined in an abstract superclass call a constructor of the actual class running the method?abstract class A { public List getMultple() {List l = new ArrayList();for (short i=0;i<4;i++) {l.add(this());//<obviously this breaks}return l}}or something like that.A ...

observing algorithm iterations

539 byte By f1technicala at 2007-10-2 15:08:53
hello,I'm building a graph display program and I have created a Layouter class that holds an iterative algorithm to move nodes.My Layouter is an interface, and my question is: how (what structure, pattern, ...) should I use to allow: - getting notification when an iteration is done, so that ...

java version + hibernate

62 byte By ss22a at 2007-10-2 15:12:07
Which is the first version of java to support hibernate

Code reading

31 byte By agerard2a at 2007-10-2 15:21:51
How does Java () "work"?

Design Advice

1403 byte By GhostRadioa at 2007-10-2 15:21:55
I am designing an application using SQL Server 2000, Struts, Java 1.4, JBuilderX, JUDE, Apache Tomcat. We want to be able to integrate Hibernate at some point in time but we can't now cause we don't have enough hands-on experience with the framework. We are implementing a MVC design and will ...

Singleton-Configuration-Loader and Interfaces with configuration-constants

3700 byte By Lena_a at 2007-10-2 15:24:53
Hi!In order to simplify the first version of my application, I have been using Interfaces to define configuration constants. E.g. Interface DataConstants: public final long NOT_SET = -1; Now I would like to expand my application using a singleton ConfigHandler to load the configuration ...

Special Singleton

566 byte By Tajallya at 2007-10-2 15:25:06
I'm looking for a way to have 2 different getInstance() methods for a singleton class. The 2 methods should return 2 identical instances of that object, except a single method which should act in 2 different ways.For example I have class MyObject, which has a getName() method. When you get an ...

OO pluggable module developing solution

1192 byte By tanisha at 2007-10-2 15:25:50
i am developing an application which implements different kinds of checks on data. i have implemented each check as a different java file(as Class). Now in future if any user/developer of the application wants to add a check, can make a new java file and add to the specified checks ...

Multiple dispatch and Symmetric methods - Where Does That Code Live?

8984 byte By fragorla at 2007-10-2 15:28:29
Hi all.I am stuck with the above problem, which looks to be a very common and fundamental one. Supposing I have some sort of relation or operation to be performed on various different pairs (or n-tuples) of classes of object. Where does this code belong, given that it is not sole property of ...

Can Java handle this?

688 byte By tasneem93a at 2007-10-2 15:34:30
I have a raw data file coming into the system. It is a comma delimited file and can have as many as 80k records. Now the problem is there could be duplicate records in the file (not any particular order) which I need to suppress based on the earliest date and then load them into a db and also ...

Persistence and encapsulation

1500 byte By Drake_Duna at 2007-10-2 15:42:44
I have recently been chewing over what appears to me to be an inherent conflict between encapsulation (or more specifically, data hiding) and proper separation of persistence concerns.Say I have a whole bunch of instances of some MyObject which encapsulates a bunch of data that I want to be ...

struts validations

527 byte By cooljavaa at 2007-10-2 15:42:52
Hiwhen am using the srtuts validator form(twin xml files) for my validations, the error messages which gets displayed like(email id not valid) is taken from the .properties file which i use..but in the above messsage.. email id is hardcoded in the validation.xml..(<arg0 key=email ...

Fat Client-Web based architecture design help ?

2769 byte By jagdishraoa at 2007-10-2 15:44:06
Hellow expertsi have recently joined a java projectwhich is a fat client-web based application.clients can work from any location or place using the internetthey will connect to the web server which will be provide the data to the clients applicationi am working on the improvement of ...

Conspicuously missing access specifier

502 byte By Drake_Duna at 2007-10-2 15:44:43
I am wondering why there is an access level that allows access to anything in the same package but not one that allows access only to subclasses. Doesn't this seem like a really obvious type to have?Without it, encapsulation and extensibility seem to be mutually exclusive aims. If you make ...

Client/Server Application Analysis & Design

495 byte By bindigi01a at 2007-10-2 15:47:28
Dear AllIt is the first time to use java forums & post a topic in it .I'll not talk too muchthe problem is that i am new to java and but i have previos knowledge with c++and i want to develop a good project injave to be good start & practicei chosed to have an chat server but i have ...