What is the difference between Service and Component

60 byte By planswermea at 2007-10-1 6:07:52
What is the difference between Service and Component?

question about commond pattern

540 byte By meetsajua at 2007-10-1 6:13:44
Hi!can somebody tell me about any good resource where i can get knowledge of designing controller on basis of command pattern and an example will help me a lot....I want to develop a controller for my application which except's data from swing client and calls the appropriate business ...

How the tiers should communicate in J2EE project?

685 byte By meetsajua at 2007-10-1 6:14:11
Hi,Should we use common user defined Data structure to communicate between layers (say between presentation layer and business layer)....Actuallly i have build a common data structre of that type in which i am using a Vector having vectors of name value pairs like MainVector| Name Value ...

web-tier design question

816 byte By geoffr10a at 2007-10-1 6:17:11
Hello,The web tier framework I'm working utilizes Struts, and I have a question about using interfaces in base action classes. We have created static utility wrapper methods for accessing different scopes and services. Now in our base action class we have wrapper methods which wrap calls to ...

Authentication in clustered web application without sticky session

3189 byte By paul.barrya at 2007-10-1 6:18:34
I have built JSP/Servlet/Struts application in the past on a cluster of app servers. Each app server has its own JVM running the Servlel Container. All of the HTTP requests come into a hardware load balancer, which directs the requests to one of the app servers in the cluster. I have wanted to ...

how to control numbr of instaces

134 byte By ag_sumita at 2007-10-1 6:21:30
If we want only 5 instances to be created and find out which one is used and which one is free the how to implement it.

Thread safe architecture problem

998 byte By jlarkina at 2007-10-1 6:23:08
I am developing a app that is utilizing a proxy pattern to "wrap" instances of a few classes. The consumer of the proxy then does not need an instance of the inner class and the inner class is shared among all of the proxy consumers. However, I need the ability for the underlying class to be ...

DAO pattern Value Objects and Data Streams

596 byte By markjavamarka at 2007-10-1 6:24:19
Suppose we have a PersonVO (java bean) with simple attributes i.e. first and last name then the DAO is quite simple and clients of the DAO layer pass VO back and forth (really cleanly).But it is a different story if a person has a picture. If the picture is small then wecould define a field ...

need help in choosing the best design approch

808 byte By ayman_1401a at 2007-10-1 6:33:35
Dear helper,I have assigned enhancement project for old system.the old system divided into three pakages:1. listener : listen to a data feed from a gateway using socket2. analyser: connects to the listner and analyse the feed using some basic string processing like substring() ...

Saving object state in persistent storage

1062 byte By fedetxfa at 2007-10-1 6:34:50
I am coding a small standalone application for my grade thesis. I have a few User,Context and Resource objects. I have a relationship between a User and a Resource in a Context or between 2 users in a Context. User is a special case or Resource. I need to store that simple model in a persistent ...

Beginner Factory Pattern help needed please

535 byte By LoveMySenseia at 2007-10-1 6:43:19
hi people, Can someone please explain to me in laymans terms what the use of the Factory pattern is. I went to http://www.research.umbc.edu/~tarr/dp/lectures/Factory.pdfand it did nit help me too much.I'd really appreciate it if someone could give me an abstract example of when the Factory ...

Struggling with DAO

2522 byte By speedsixa at 2007-10-1 6:50:33
Hi,I'm currently in the process of writing my first 'big' java app, mainly as a learning process (can say that again) and I'm struggling with the dao aspect of it. The application is a small client/server app that runs on a network with the need to persist objects to some sort of simple DB. ...

How can we use Singleton Pattern in a clustered environment.

379 byte By dineshkdma at 2007-10-1 6:56:28
The Concept I know about Singleton is "one and only one instance of a class at any given point of time in a single JVM ". The moment the clustered environment come, it would end up having multiple JVMs and hence each JVM would have an instance of this Singleton classCan anybody know how can we ...

Public singleton

1855 byte By hdevaana at 2007-10-1 6:56:30
LS,I'm curious about a design issue regarding singleton objects. I know that the whole idea of singletons is debatable (for instance, see: http://c2.com/cgi/wiki?SingletonsAreEvil), but for the purpose of this topic, let's just assume that we want to create a singleton.I'd like to hear what ...

Polymorphism?

727 byte By graysa at 2007-10-1 6:56:31
I'm currently designing an application in which there are three objects that extend a basic object, e.g:BasicObjectMyObject1 extends BasicObjectMyObject2 extends BasicObjectMyObject3 extends BasicObjectAny one of these three objects can then be used depending on what is selected within the ...

What is the best way to implement a cluster-wide object ID generator?

76 byte By scriptesta at 2007-10-1 6:57:06
What is the best way to implement a cluster-wide object ID generator?

Sequence Diagrams

770 byte By James_Scrimshirea at 2007-10-1 7:03:50
I have a some high level sequence diagrams, I want to know if there is a specific notation i should use for relating the steps to particular use cases by ID. e.g I have use case Document Processing (ID UC-01-01) as a step in a high level sequence diagram and i need to somehow link the Document ...

Unknown Objects

1117 byte By graysa at 2007-10-1 7:04:00
Ok, heres a question for the Java Masters. I have a situation in which I want my application to be governed by modules. Each of these modules is just a class which extends a class called StandardPanel (which itself extends JPanel) and implements a class called BasicModule. Now, to have ...

What is singleton design pattern

233 byte By amitindiaa at 2007-10-1 7:04:06
Hi All,Anybody please tell me what is Singleton Design Pattern ?What is the right definition of it and where can I get the right information about it.Please help and reply soonThanksAmitindia

API vs Impl (compile time and runtime)

447 byte By balteoa at 2007-10-1 7:10:11
Hello,I am building an application and I would like to have an api jar (used at compile time) and an impl jar (used at runtime) as you get with most java apis. (One api.jar containing the interfaces and one impl.jar containing the classes). Can anyone give me a skeleton for that please? How can ...

Java Code To UML

278 byte By steve123a at 2007-10-1 7:12:01
Hi All,I have 30 - > 40 classes and I want to know if there is a tool available which parses all the Java files and creates a UML diagram from it?It should run on Unix. All the tools I have seen and for UML - > Java. Any go the other way.Thanks

Design asynchronous Application: Delegator OO violation

1103 byte By fuzzy_askiria at 2007-10-1 7:19:45
I had posted a query earlier.. I wanted to design an asynchronous application where I was not able to do a wait/notify as there are multiple requests and assigning a thread to each request was impossible. If I use callback approachMy code could have been something like this:public void ...

How to override equals method in a HashSet

1060 byte By 0zero7a at 2007-10-1 7:22:16
Hi all!I would like to extend a HashSet in order to override the "equals" method to detect the addition of an object "MyObject" previously added.Can anybody explain how should I implement this method?If I have:public class myObject {int x;int y;}How should be the overrided equals method?public ...

prototype pattern

1801 byte By watsonyayaa at 2007-10-1 7:29:48
public abstract class AbstractSpoon implements Cloneable{   String spoonName;   public void setSpoonName(String spoonName) {this.spoonName = spoonName;}  public String getSpoonName() {return this.spoonName;}  public Object clone() ...

encapsulation vs. performance

880 byte By h.buergera at 2007-10-1 7:33:07
We are creating a J2EE application with an O-R mapper to solve the persistence problems. We plan to create Java objects which encapsulate certain aspects by creating a service interface. These services use persistent objects backed by some database tables.Now we have some decisions which need ...

defining Business Delegate signatures

1136 byte By osammota at 2007-10-1 7:33:58
Hello, I would need some hint about defining signatures of BD implementation, respectively to web interface behaviour. I would like to understand the best practice starting from stratch, postponing refactoring considerations.I would expect more or less a 1-1 relationship between WUI controls ...

Architecture Advice for Web/Swing

599 byte By cleggj98a at 2007-10-1 7:35:22
I have been working on a project that has both some web functionality and a client side GUI app, both connecting to the same back end. It is using java for the web side and VB for the client GUI. I am curious to know, as I haven't been able to find good examples, what the best way would be to ...

C++ vs Java: Constant Functions

408 byte By fuzzy_askiria at 2007-10-1 7:45:59
If I want to ensure that a function does not change the instance variables, or in other words, I want to ensure that a method invocation does not change the invoking object. How do I do it, in C++ adding a const at the end of the method declaration would do the job and I dont think that Java ...

exception handling and Comparator interface

820 byte By Cedap_SunDNa at 2007-10-1 7:46:33
I want to sort a Collection with a Comparator.I define a class that implements Comparator, thus it implements compare method:public int compare(Object o1, Object o2) {//My objects are actually stirngsString str1 = (String)o1;String str2 = (String)o2;//I perform some transformation on the ...

Override vs Hiding

816 byte By jkumarta at 2007-10-1 7:47:39
public class ClassA {public void methodOne(int i) {}public void methodTwo(int i) {}public static void methodThree(int i) {}public static void methodFour(int i) {}}public class ClassB extends ClassA {public static void methodOne(int i) {}public void methodTwo(int i) {}public void methodThree(int ...

Generic data entry architecture

2517 byte By melser.antona at 2007-10-1 7:52:34
Hi all,What we would like to do is create a platform that will enable our company to keep very tight control over data entry quality. It would need to be generic enough to be able to handle basically all kinds of data entry, even classing things like scanning as such (images being data). The ...

Singleton registry

640 byte By bianstera at 2007-10-1 7:55:20
I was going through Bruce Eckel's Thinking In Patterns and was not too sure as to what was required in an exercise question"Create a registry/lookup service that accepts a Java interface and produces a reference to an object that implements that interface."Is the question asking for an ...

Category, SubCategory, and Classification OO design

448 byte By kmthiena at 2007-10-1 8:00:20
Hi guys,I am really stuck in designing the OO way for product category, subcategory and classification stuff like that. I need something like this: http://list.auctions.shopping.yahoo.com/sg/0-submit.htmlCan somebody recommend the best way to design OO like that? This is because some category ...

How to draw in class out side of it ?

314 byte By NCS_Onea at 2007-10-1 8:01:28
Hi Im trying to create : class MySomething extends Component { public MySomething() {} public void paint(Graphics g) { g.drawString("MySomething",10,10); } } but when i call it from a applet it doesnt draw in the applet. Thanks for all the ...

Best practice

3662 byte By him10279a at 2007-10-1 8:06:12
I am implementing a Customer business object (remember its not an EJB) in my java project where I will be implementing addCustomer(),removeCustomer() and selectCustomer() methods to start with.public class Customer{public void addCustomer(){/*Implentation*/}public void removeCustomer(int ...

Interface Design

408 byte By sbainsa at 2007-10-1 8:09:37
hi,I am trying to send an object from class Waiter to class Kitchen via the kitchenInterface class. The interface class has a sendOrder method which is envoked from class Waiter. This sendOrder() method would also have to be in Kitchen ? KitchenInterface can only call methods contained in ...

How to write threadsafe singleton?

3127 byte By heavyza at 2007-10-1 8:09:38
hi everybody,I'd like to know how to write threadsafe singleton. For example, i have a singleton like:public class MySingleton {private static MySingleton instance = null;private MySingleton() {// construct the singleton instance}public static MySingleton getInstance() {if (instance == null) ...

Need a free UML tool

479 byte By Ahmed.Saada at 2007-10-1 8:10:05
Hello,I don't know whether this is the right forum or not. I need a free tool that draws UML diagrams. All what I need is to draw quite large UML diagrams and draw packages in it. Then I will print it. I do not need any advanced features like code generation and reverse engineering. I tried ...

Interface help

977 byte By sbainsa at 2007-10-1 8:19:06
Hi,can anyone point me in the right direction of how java Interface works? I am trying to implemnt a client server application that uses interfaces. There is only one server Interface that the client will talk too, however there will be multiple instances of client Interfaces that the server ...

factory and abstract factory implementation

789 byte By sodagala at 2007-10-1 8:23:21
i have a problem implementing the factory pattern.Pls pls help........ the problem is "I have a program called HomeApplianceCenter that is used by a home management system to control AC and Refrigerator. To support client preference of runnig the appliances I have a Preference class. I need to ...

Generalization vs. Specification

629 byte By valjoka at 2007-10-1 8:33:11
Please, consider a design as hierarchies of basic cells. Some of them are roots, others have a reference to their parents. You have two options: [1] define a general node object with parent reference specifying the root by pulling the reference to ground. This is how matematitions do, for ex: ...

Singleton in web application

2816 byte By jc.csca at 2007-10-1 8:34:47
Hi there,I have a Singleton and TimerTask class in the same web application that deployed into Jboss. Both TimerTask.run() and test.jsp have the same line of code:Singleton.getInstance().some()What I did is:1. when I started the web app, and load test.jsp, the Singleton object is created.2. ...

Factory Design Pattern ?

148 byte By amitindiaa at 2007-10-1 8:39:06
Hi All,Is the "Factory" and "Enumeration" is a design pattern if so what are they and where we used them.ThanksAmitindia

MVC: Mutliple models for the same View

1602 byte By avvissos@uka at 2007-10-1 8:41:17
Hi,I am developing a program using (or trying to use) MVC pattern and I need to use the same View for a number of models. Is there any specific pattern/approach?In detail (simplified):1. I've got my model: a simple class called Birthday, that simply stores a the "name" of a person (a String), ...

DAO object Design Pattern

215 byte By chetan_vermaa at 2007-10-1 8:47:11
i have to develop a web base applecation which is database indepandent, to achive this functionlity i have to use DAO design pattern. can some one explane me more about this............................

Entity beans DAO DTO and properties inside the object question...

958 byte By tomerbd1a at 2007-10-1 8:49:31
HiI have an entity bean that represents a user. (UserEntity)I have an entity bean that represents accounts of users. (AccountEntity)I have also these:DTOUser, DTOAccountDTOUser contains a DTOAccountA user can have multiple accounts.Above my entity beans i have objects that contains some more ...

Business Delegate pattern - need some advice

3805 byte By raphaelpba at 2007-10-1 8:51:14
Hi. First let me apologize for the long post. I could see no other way. I抦 building a system that quite large and I need some advice. The system is a type of transaction system, let抯 suppose a shopping cart. I抦 using struts taglibs and tiles for presentation, struts proper for controller, and ...

Abstract Factory pattern?

657 byte By scarpantibus@gmail.coma at 2007-10-1 8:51:24
Dear Sirs,I'm a student and I'm doing a little project regarding a compiler. This compiler should generate an executable program that wiil be interpreted by a virtual machine(RASP machine). The instruction of the executable language should be implemented by the Command Pattern, but when I ...

State Pattern throwing exceptions

583 byte By quereinsteigera at 2007-10-1 8:55:19
I've seen the state pattern applied to a situation where I am not sure if a state pattern applies.Can you please tell me if the state pattern is good for this situation?It is that only a few operations can be called for a certain state. If you call "wrong" operations for that state, an ...

How to XMLEncode a hashtable

196 byte By gcsrosa at 2007-10-1 8:56:41
I have a property of type hashtable with get/set methods. When I XMLEncode the object it looses the info in the hashtable. DOes anyone know how to go about this?ThanksR