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 ...
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 ...
8 byte By
at 2007-10-2 13:17:43
?
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, ...
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 ...
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 ...
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 ...
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 ...
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) ...
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 ...
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 ...
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- ...
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 ...
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 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 ...
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, ...
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.
thanks for any input
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 ...
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 ...
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
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 ...
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(); ...
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 ...
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 .
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
62 byte By
ss22a at 2007-10-2 15:12:07
Which is the first version of java to support hibernate
How does Java () "work"?
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...