AsynchronousLoad and AsynchronousLoad problem

412 byte By MIlea at 2007-10-2 6:27:14
Hi all:i want to implement two methods :asynchronousLoad() and synchronousLoad(),but i don't understand asynchronous and synchronous clearly.Q1:when i implement them, whether i need to create thread on both of them, or i olny need create thread on one of them? Q2: the keyword synchronized ...

Stop me re-inventing the wheel

584 byte By akwattersa at 2007-10-2 6:27:31
I have an application to build that does the following.1. Receives a request for data.2. Passes the request to other sources.3. Aggregates the data from all the sources.4. Returns the aggregated data.If there are 10 sources and each one takes 10 seconds to return the data and the sources are ...

Obtaining roles from desktop

332 byte By nitin.softplusa at 2007-10-2 6:31:45
Hi,In my project there is a need to obtain all roles entiltled to any desktop.There are 100s desktops created in the portal and I need to know roles of a specific desktop.I did not find any method of any class in the portal API. Please help me to findout correct class/api. Thanks in ...

Using Listeners

1108 byte By Curtis_Pastorea at 2007-10-2 6:37:02
Ok so I would like use (.. I think) the Listener Patern to make a few things happen for my program.What I have is this: My GUI has many little controllers for check boxes, radio groups, text fields .. etc. So at the click of a button, I would like for each of them to be able to interpret their ...

DB application design - which one, how to.

2086 byte By Piotr.Kobika at 2007-10-2 6:41:20
Hi,I have a problem with DB application design. I have in my mind few ideas but I am not sure which could be better for further develop & maintain.The first idea is to create connection and statements on every dialog, hard code sql commands into the code. It would looks like the easiest and ...

Many Classes Vs Many Methods in one class

404 byte By Aarvia at 2007-10-2 6:42:55
Can any one tell me what are the advantages & disadvantages - and which is better?Having many methods (say about 15) in One class - about 10 doing various actions and not interrelated at all.Vs spliting the methods to be in their own classes, and instantiating them only when needed? Say in ...

Parallel Hierarchies: Bad Design?

451 byte By Saisha at 2007-10-2 6:43:27
Just trying to find out if there is any consensus on this. Suppose I have an interface hierarchy three levels deep. In providing a default implementation for each, the class hierarchy is also three levels deep. In effect, there are two hierarchies, one for the interfaces and the other for the ...

Question regarding decoupled Factory

3818 byte By kwiberga at 2007-10-2 6:46:12
Hello Java Experts!I'm rather new to patterns and I tried to make a Factory of some kind that can return Commands of various types (create, find, update, delete) and of different families (different cases).The code below works but I would like to hear from you experts what you think of it. Can ...

Newbie - DAO problem.

1580 byte By leezarda at 2007-10-2 6:46:35
Hi all,I'm writing my first webapp using database connection pooling, and I'd like to use DAO design pattern also (I have never used it before). The first problem is:I have 2 db tables "users" and "roles", where every user can have more than one role. Now I create UserBean containing:- userid ...

Roles design

1234 byte By didia at 2007-10-2 6:48:45
Hello everyone,I am trying to find out what would be a good design to deal with roles.What i have got so far is something like this:- User class. This class contains the information about the user (name, address...) and a List with the roles he can use.- RoleFactory. Here i have implemented ...

Technology for fast accessing the Databases.

443 byte By sun.java.developera at 2007-10-2 6:51:33
Hi All, Can you please let me know what would be the technology for fast accessing the server database from the client. If I have database of lacs of rows, and I want to access it withhin a fraction of second then what would be preferrable.What technology the gmail is using so we could connect ...

thread missing

150 byte By kilyasa at 2007-10-2 7:00:02
The "what is the ideabehind having interface and class inherritance" thread just got missing!!! I dont think it was abused in any fashion!!!!!!

Simulating Multiple Inheritance in Java

843 byte By sean1414a at 2007-10-2 7:03:10
Problem: I am trying to obfuscate code and create wrapper classes to access code implementation. Problem is that some parameters in methods have different types. (i.e. public class Example{ExampleImpl exampleImpl;public void setExample(Problem exam) {exampleImpl.setExample(exam);//complile ...

Where the hell...

197 byte By kablaira at 2007-10-2 7:04:49
Did that thread on inheritance go and which one of you half-witted morons reported it for "abuse" to the quarter-witted retards who run this place just because you weren't getting your way?

Need new access specifier

677 byte By daniala at 2007-10-2 7:06:06
I think there must be another access specifier that is like protected but not friendly, I mean only the supclasses can access that, not the classes in that package.Suppose a class that has private or friendly fields and I had to define another field of the same type for its subclass.Or I have a ...

Gui Guidance

1159 byte By Curtis_Pastorea at 2007-10-2 7:08:35
So in my earliest days of programming I have had many programs with guis. These GUI classes eventually develop into code monstrosities, when compared to my other classes. I'm told that I should step away from using the GUI class to do things like interpret my programs "state" and hold other ...

"Responsibility" is so vague.

907 byte By LinMinha at 2007-10-2 7:11:53
let' s consider the responsibility of a controller/manager class.a controller/manager always never do real job, it just delegate other objects to do jobs for itself. so what about the responsibility?for example, A controller class named c1 delegates many jobs to a lot of other object -- which ...

problem with overriding & testing

2936 byte By tusca at 2007-10-2 7:16:36
I have a class which initialize itself (constructor) with data in a file. I want to test it, with various datasets. So I put the code that pick the data from file in a method, and I override that method in my tests:public class ClassToTest {private String value;public ClassToTest() {this.value ...

Performance of Java Object Referece

7705 byte By popohomaa at 2007-10-2 7:19:03
Hi all,I have a Performance question want to ask. The original code are shown in the below:public static String[] itemDetails = { "item ID", "item Title", "item Description", "item Price", "quantity in stock", "quantity in order", "release day"}; public static String[] cdDetails = { "CD type", ...

problem in downloading struts_blank.war

215 byte By jagroopa at 2007-10-2 7:19:44
hi i am trying to download struts_blank.war file from google.combut i m not getting any link plz tell me how to download struts_blank.war file.from where will i get link for this..

Correct Use of the Mediator pattern

4379 byte By marek.ja at 2007-10-2 7:22:50
Hello everyone. I am designing a small application and I am thinking of using the mediator pattern. But I'm not sure how exactly this mediator should be used.Should a frame construct a 'GUI mediator' which will then coordinate its components...public class MyFrame extends JFrame {public ...

observers, drawbacks & alternative

437 byte By bichonadea at 2007-10-2 7:31:53
hey..I need to make a report about design patterns and observers. I need to speak about avantages, drawbacks (for the two one) and i have to find an alternative to observers. I already done avantages about design patterns and observer but i do not manage to find real drawbacks of observers. And ...

conditional statement patterns

1438 byte By Jenskia at 2007-10-2 7:32:17
Are there any patterns for use of 'if statements' or 'switch statements' ?I want to know if there is a better way of writing this for example.....private void actionOptions(String cmd) {if (cmd.equals("Pause")) {simulationStatusHolder = SIMULATION_PAUSE;stopGo.setLabel("Go");notify();} else ...

Design Guestion

634 byte By haroldclementsa at 2007-10-2 7:34:53
Hello,I have a design question; I am not too sure if I am going against the whole principle of OO but here is my question.I have a main window that calls two different classes, one is a load of JSlider and the other that has a JTextPane. Now if I make an adjustment to the slider how do I get ...

Activity log design issue in web application .. Whatabout AOP ?

907 byte By hibernfana at 2007-10-2 7:35:28
Hi guys. ..I am working on a big web application in which there is module called activity log which actually logs most of the activities one perform in application like make a payment , defere the payment , issue the check etc. Almost all components in the application less or more use this ...

Domain Object and Service oriented pattern

1789 byte By sandipan_sa at 2007-10-2 7:46:08
We have J2EE based application with following components, we are facing some issues with existing system.Current System : We have J2EE based application. The following is the flow. Client Layer [including JSP, Struts ] action classes  Delegates  Session fa鏰de [Session ...

Implimentation advice

703 byte By srinivas81a at 2007-10-2 7:51:03
i have a situation where i have to design an application which works like this:a client-server architecture which works in an intranet/internet environment, which stores data in centralized database. Simultaneously the client needs to work offline sometimes i.e., which can run on a laptop and ...

Factory Pattern - Abstract or Interface

507 byte By jaybyteza at 2007-10-2 7:52:11
When using the Simple Factory Pattern to hide the creation of the concrete object, should the abstraction class be an interface or an abstract class...or does it matter. I have seen books say "The Factory Method Pattern defines an interface for creating an object"...Head First Design Patterns. ...

Design of web app

714 byte By bhupendra.aolea at 2007-10-2 7:54:42
Hi every one, Im working in a s/w company and we got a project on warehouse management. the overvew of proj. is the same as any other: there is an interface, the business logic, and then a database. The interface(we'll use swings) has to connect to the database, and perform various ...

Pattern Related Question .. Please help

1168 byte By saurabhagarwal1981a at 2007-10-2 7:57:06
HI All,I am little confused on the stratergy to choose while solving a particular problem please help.I have a list (Call it main list A) and each element in this list contains another list( different list for each different element in List A). I need to send command to each and every element ...

Swing Client to Oracle DB architecture change

868 byte By raffaeledianaa at 2007-10-2 7:57:28
Hello.In our company we have a big Java Swing application directly interfacing to Oracle through JDBC drivers.In order to re-architecture the application looking for minimize bugs, maintenance, development delays, etc, etc, i'd like to use something different.Obviously different modification ...

Swing + JGoodies, EJB3 / Hibernate - Design question...

2829 byte By sholodaka at 2007-10-2 7:58:24
Hi,Forgive me if I screw up the terminology here.. I'm pretty new to J2EE and Swing development. I'm developing a Swing based application to replace a paper process. It's basically a long form that gets submitted to a server where it is reviewed and in some cases sent back to the user for ...

Refusal to use marker interface as parameter?

1229 byte By alanpza at 2007-10-2 7:58:57
Heya all,I've seen a lot of professional (ie Apache, Sun, etc) Java code that has code similar to this:public void serialise(Object o){if (o instanceof Serializable)throw new IllegalArgumentException("Object is not serializable");... code here...}Whereas surely it could be re-written as:public ...

wht's ur opnion?

531 byte By sr1_reddya at 2007-10-2 8:02:16
analyze todays object oriented language,c++(or java) and show,support by clear and convincing ratonale and arguments, which of the language constructs are absolutely essential for genuine general-pupose object-oriented programming languages.in other words,find the canonical set for any ...

Transaction and Connection in DAO

1375 byte By bipul_k_kuria at 2007-10-2 8:03:00
Hi All,I have Tables TB_Employee,TB_Salery,TB_Documentshaving there relevant attributes.I have different DAOs EmployeeDAO,SaleryDAO,DocumentsDAO inheriting from BaseDAO having getConnection() and closeConnection() The above DAOs have corresponding insert,update,delete and Select methods say ...

is polymorphism a bad design for object oriented concept?

733 byte By sr1_reddya at 2007-10-2 8:03:04
i think polymorphism is bad concept for object oriented concept..having the same name with different parameter function ..according to my opinion may constitue in efficient skill in programming..instead if using the same name why we cannot use different name...for example each human being will ...

regarding object oriented concept

637 byte By sr1_reddya at 2007-10-2 8:03:16
hai i am a student..i just want to know the opnions of everybody...considering todays object oriented language what will be the futurelanguage features? (for example if u consider c language which is basis for c++.. it has polymorphism ,inheritance, encapsulation. etc features..which are not ...

Does this account for Delegate and Strategy ?

740 byte By SrikanthBasa at 2007-10-2 8:07:08
Can I say delegate and strategy both are used at the same time in the example below ?I load a class through reflections and invoke a write method on that. Now this in turn may write in to a file or database depending on the class being loaded (className) and each class that can be used ...

Make a class both Observer and Observable

459 byte By aboaventuraa at 2007-10-2 8:09:03
Hi,Sorry If it's a basic question, but I would like to know if there is any problem if I do something like this:public MyClass extends Observable implements Observer{}MyClass is observed by another class and observes another one too. Any problem with that ?Thanks ...

Concurrent Update Question

126 byte By alexleonga at 2007-10-2 8:11:52
hi,Is there any design pattern that prevent 2 users from editing the same record at the same time ?Thanks

Storing the data in an XML file

339 byte By MithunKa at 2007-10-2 8:15:25
Hi all,I have designed an application that uses XML as the storage instead of database. I think searching for a particular element in an XML file is complex, and other than that I am not seeing any problem.So I need u guys view points on this "usage of data in an XML file".Thanks in ...

Why no equals method in String buffer

192 byte By Kaputaboa at 2007-10-2 8:17:12
We all know StringBuffer does not override the equals method. Now there should be a specific reason why java did not override the equals method. Anybody knows what that reason might be?

Database Intensive Operation from Java - CC Statement like application

1381 byte By sreenidhi_nka at 2007-10-2 8:18:55
We have a system that handles transactions using a magnetic swipe card, similar to credit cards. There are close to 10 million users using this type of cards and the transactions for a member per month is close to 5. All transactions go to a database table ACTIVITY. Database used is Oracle ...

Simple MVC desktop example wanted

1116 byte By WarrenSa at 2007-10-2 8:20:05
Hi,I've been looking and can't find a good example of MVC in a desktop application. I don't mean MVC as it is used in component development (I've seen some examples relating to Swing and Buttonmodels, for instance), but more business-object level. I'm not a Java or Swing expert, but I have ...

I wanna get a UML Case Tools, where can i find one for free or opensource?

127 byte By rick.qina at 2007-10-2 8:24:19
Hi, Merry X.Mas!!!I wanna get a UML Case Tools, where can i find one for free or opensource?Merry X.Mas!!!

Builder vs Factory Patterns

198 byte By chamalsla at 2007-10-2 8:25:47
Hi,I read about builder and factory patterns. But both of them look quite similar. Can u plz help me to understand the difference between them.Thanking You,Chamal.

Aggregation and composition in UML 2.0

498 byte By devesaa at 2007-10-2 8:27:38
Hi,a) I've been told that aggregation and composition do not exist in UML 2.0. Is it true? Then how are these relations written?b) We have UC 1 and UC 2. They include UC 3 (abstract). Then in UC 3 sequence diagrams, the start message wouldn't be from an actor, but from an Object. Is it ...

injecting good patterns and OOD into old app

671 byte By arabotha at 2007-10-2 8:40:08
if you have an application that has been in development for 5 years w/o any architectural oversight or concern, how do you go about putting in good design at this point?to them the program "works".and i guess it does, but how do you convince the program owners that "good practices" should be ...

Good design choice, different types of customers, from webservice

1433 byte By HTRC.SEa at 2007-10-2 8:43:12
Hi, I have thoughts about good design pattern, when doing this:You have a webservice where customers coming into your system. The customers are private ones, business ones, and big business types.These 3 customer types has different needs, and must have different values like companyname, social ...

JNDI Lookup

59 byte By orjaykaya at 2007-10-2 8:44:05
Do you think JNDI lookup is expensive?Thanks!