Service Object Responsabilities (comparing it with a Facade Object).

699 byte By sim085a at 2007-10-3 4:02:01
Hello,I am sorry if this question has been asked more then once. I have just read a book explaining on how to develop a web application using light weight frameworks.In this book I was introduced to Facade Objects and Service Objects. Before I used to have only service objects (which managed ...

toArray

26 byte By ramjia at 2007-10-3 4:02:17
Why we use toArray.

unidirectional vs bidirectional association

906 byte By cloraca at 2007-10-3 4:09:38
Hi,I've read lots of examples and it seems to me that, in reality, these are bidirectional associations:Employee and Department (given an employee, you can find out what department(s) s/he belongs to; given a department, you can find out which employees are in it)Parent and Child (given a ...

How to create object at run time

219 byte By Subba_Reddya at 2007-10-3 4:10:40
I want to create object for class name.I am geting the Class Name at run time from xml file. That name will stroe in one string varible.I want to create object for that name. how its posible.

use of marker Interface

68 byte By Taun4javaa at 2007-10-3 4:11:11
can any bdy plz tell me what is the use of marker interface ?

Smart Reference Proxy Pattern

332 byte By Robsta10a at 2007-10-3 4:15:57
Hello!I'm interested in the smart reference proxy pattern but I only found some short descriptions of it on the Internet. What I need is some kind of example code.Can somebody provide me with an appropriate link or does somebody have experiences implementing this pattern?Thanks in ...

Facade and Observation

259 byte By Sarah_Mahdavia at 2007-10-3 4:17:40
Hi, i have a problem. in my design, clients are observers for API changes. We made facade class as Observable. but i think its not appropriate design because i have to add some bussiness logics(related to notify observers) in Facade. what should i do?!

Linking other patterns with Observer

665 byte By ChrisKempstera at 2007-10-3 4:23:15
Hi allRight up front, Im very green with design patterns. That said :)I think I have a good grasp of the observer pattern. I wanted some quick thoughts on other design (or anti) patterns that you may also use with observer to avoid specific side effects, implement a M:M rel with ...

Bless with your Suggestion On Pattern

1393 byte By rajpuniaa at 2007-10-3 4:25:45
Hi Gurus I am having Five column in my table. I am fetchinh all the data in An arrayList. For Displaying Purpose I am using The code Below is for Displaying it on the jsp. I want to Use Iterator or some Other Pttern which will Bee suitable for It. Plz Bless with your Suggestionfor(int ...

Objects and multi-mode

8943 byte By sri1025a at 2007-10-3 4:26:04
I have a properties file and I have a few sections like this:section1=truesection1.name1=value1section1.name2=value2section2=truesection2.name1=value1section2.name2=value2section3=falseWe wanted to create a Java object representing this properties file by composing the java.util.Properties.But ...

applicationContext not found - Spring-Hibernate

927 byte By drorasta555a at 2007-10-3 4:31:13
Hi thereI'm using WebWork with Spring and Hibernate . IDE netbeans.My Hibernate properties are in the applicationContext.xml that is placed just under the WEB-INF.When I try to call the: new ClassPathXmlApplicationContext("applicationContext.xml");or new ...

Dynamic loading of jar files

325 byte By dan_aravinda at 2007-10-3 4:33:41
Hi In my application I need to dynamically create objects of types specified by string which is passed as parameter. I am able to do this if the class is inside the same jar. But I need to load the class from any jar name specified. How do i go about doing this? Is there a way to dynamically ...

MVC - Organizing models and managing GUI windows

3151 byte By Techniquea at 2007-10-3 4:34:33
I'm having difficulty organizing my MVC models and basically controlling the whole application in general. My application works, but all the controlling logic is being dumped into the main class (Main.java). Here's a simple example of the problem I'm having:Objectives1) Display a list of ...

adding new feature without recompiling

413 byte By techy2001a at 2007-10-3 4:36:47
i have a question i have this program in java that translates one language to another now i want to be able to add another translator later if i required at runtime without recompiling the whole thing.that is i should have the provision of adding new translators feature which i dont know now ...

question about design pattern - business delegate: repost

510 byte By yu169409a at 2007-10-3 4:40:59
hi guysi have got a question to ask about the delegate pattern. usually, we use it to decouple between presentation client and businessservice tiers. for instance, the service tier has an session ejb, and delegate wrapps the ejb. and the web client calls delegate to access service. is the ...

a bit concern on my pattern(Dependency injection)

2686 byte By pp8080a at 2007-10-3 4:46:20
Consider the following case:Dependency injection pattern:public interface A{void foo(String para1, String para2, String para3, String para4, String para5 );}public class B implements A {void foo(String para1, String para2, String para3, String para4, String para5 ){ ...}}now i have to write a ...

Dao Spring Hibernate implementation. Your opinions are appreciated (-:

3223 byte By drorasta555a at 2007-10-3 4:51:14
Hi thereI just wanted to know if my simple Dao Spring Hibernate implementation is good. Hope you can give me your opinions.public class BaseDao extends HibernateDaoSupport{public BaseDao() {}protected void saveOrUpdate(Object obj){getHibernateTemplate().saveOrUpdate(obj);}protected void ...

Enable/Disable pattern?

531 byte By Mitch_Ja at 2007-10-3 4:56:28
Hi,I have a DataModel which holds quite a few fields - about 30. I want to implement this model such that each field also has a notion of being enabled or disabled. By default, i want all fields to be enabled. Then there's the tricky part - setting a field's value may enable or disable other ...

All Patterns at one place

315 byte By Omkarama at 2007-10-3 4:56:39
Hi, I want all the Java Patterns at one place; not the J2EE patterns. Eric Gamma book provides examples in C++.It's unfortunate that I can't find Java Patterns at java.sun.com.I am looking at javacamp.org.Can somebody suggest a good web site with all Java patterns in ...

Hey,How can i calculate how many times i have the following pattern {num}

190 byte By AvihaiMara at 2007-10-3 5:14:18
Hey,How can i calculate how many times i have the following pattern {num}*** num - is a positive number .*** the number is between curly braces.Thank you .

Recommanded J2EE design pattern

692 byte By George_Smitha at 2007-10-3 5:15:15
I have a program with the following design:one WebServicewhich calls one EJB (Session bean).The EJB is calling one of 9 STATIC(!) methods (depends on parameter that webservice accept) which can call another static methods etc...I know this design is bad, and I want your recommended design for ...

Pattern Suggestion for Extractor Classes

1500 byte By quadfxa at 2007-10-3 5:27:04
I currently have several "extractor" type classes and I am curious if there is a more efficient way of doing what I am doing now.Let me explain with examples:I have several Extractor classes calledSnowExtractorWindExtractorMetaExtractorDepthExtractoretc.each extractor looks very similar but is ...

A bit confused about the Service Layer

1376 byte By aconst_nulla at 2007-10-3 5:27:08
So, I've got a "rich domain model" sorted for a fun little app Im playing with at home. All the "business rules" are in the model.So, next step - I guess I want a "Service Layer" which directs the use cases in the app, controls security and transaction demarcation and would be talked to by, ...

DAO pattern and Java Persistence API

1145 byte By jusia at 2007-10-3 5:37:14
HiThis is a question for anyone who might be familiar with the standard DAO design pattern and the Java Persistence API (JPA - part of EJB3). I'm new to this technology, so apologies for any terminology aberrations.I am developing the overall architecture for an enterprise system. I intend to ...

Reassigning a method parameter

177 byte By sri1025a at 2007-10-3 5:45:18
Hi,I was looking at the new features of eclipse 3.2's JDT and in there they have mentioned that re-assigning a parameter is considered a poor practice.Why?

Memory performance question

470 byte By George_Smitha at 2007-10-3 5:45:44
HelloI need to know what is preffered regarding memory usage : 1) using static methods or using non static methods2) using static members or using non static membersbecause from a test a made, it seems that a combination of using static methods and non static members, is the best choise and ...

Please recommend me the best J2EE design pattern

714 byte By George_.Smitha at 2007-10-3 5:51:47
HelloI decided to rewrite my J2EE application.This application will be installed on Websphere App Server 5.My application should return XML's (as String) from remote requests, probably by webservice/es .There should be 9 kinds of requests.Which design do you recommend me to use ?Please suggest ...

linking UI to application layer

480 byte By aus_java_studenta at 2007-10-3 5:53:34
Hi,I consider myself pretty new to oo, so this question might sound stupid.How do I link the UI to the application/busines/ domain layer?I mean can I pass messages from the domain layer to the UI or does the UI send messages?For instance, to update a result in a textfield do I send a message to ...

Enterprise bus paradigm

768 byte By kilyasa at 2007-10-3 5:54:46
Looking at the Enterprise Service Bus architecture, where the bus is simply a static router and then adding on top of it some decision making capabilities it would be called a Dynamic Message Router as per "Enterprise Integration Patterns" and then further down the road, if you add a Business ...

Application architecture for high volume data transaction

940 byte By Zubsza at 2007-10-3 5:59:25
Hello,I came across a performance issue in one of the application developed for our customer. The application is n tier application involving a rich client, EJB application server, DAO layer and data base. The data is transferred within the layers from DAO to client using value objects. DAO ...

Read/write from a ArrayList without using synchronization

330 byte By akhannia at 2007-10-3 6:00:46
In a multithreaded environment, where multiple threads are reading and writing to a ArrayList, what is the most efficient thread safe way of reading and writing from a ArrayList without incurring the cost of using synchronized keyword.In simple words, have a thread safe arraylist, without using ...

Java EE App design question

1245 byte By JamesSelvakumara at 2007-10-3 6:09:08
Hi all,I've have to design an Java EE application which consists of a "Web Client Tier" which handles web based users and "App Client Tier" which consists of several application clients.Points to concern:1. The load from app clients will be more than from web clients.2. Typically the web ...

A design for document creation

412 byte By vislavtia at 2007-10-3 6:12:23
Hi All,I am working on a project which needs documents to be created. Currently we create 5 documents(pdf files). I would like to create a design so that tomorrow if there is need of creating new documents I can create them easily without much code changes. The documents format may be ...

Dynamic Business Rules - Where to place

1438 byte By Accenture9a at 2007-10-3 6:39:07
Hi,I am doing POC for a fortune 10 client and they have some business rules before crud actions are going to take place in DB. We have very minimal tables (less than 10) and its small application but web service (btw, this has to be webservice app) consumers are around 200 per sec. The ...

Should I declare IllegalArgumentException in my method declaration

1052 byte By sri1025a at 2007-10-3 6:40:05
Hi,I have a setter method which throws an IllegalArgumentException which is of type RuntimeException... It means that I need not declare it in my method declaration, but I should explicity describe in Javadoc.Is it a good practice to declare it in throws clause just to make it more readable? or ...

Any good article on Singleton design pattern recently updated.

126 byte By TNITHY@Java_Tipsa at 2007-10-3 6:44:48
Hi,Can anyone suggest me a good article on Singleton design pattern recently updated..?Thanks in advance.

Access Session variable across the hosts

438 byte By JoshyzJavaa at 2007-10-3 6:44:56
Hi,I am facing an issue. Please find the following scenario.I have a login page which is under a secure host. When the login is successfull, the control will be directed to a non secure host, where I have to access a session variable which is set in the LoginPage (which is a secure host). Can I ...

A good book on design patterns?

404 byte By SimonCa at 2007-10-3 6:49:31
Hi there. Just wondering if anyone could recommend a good book on design patterns, for someone who's relatively experienced at the nuts and bolts of programming in a few languages, but hasn't really considered design patterns before? Someone recommended Gamma et al's, 'Design patterns: ...

building a clock

170 byte By Gema at 2007-10-3 6:54:06
I am having trouble building a clock that goes from military time to regular time. It starts at 0930 and goes to 1730. It then performs a subtraction of the times.

Service Locator Pattern - EJB 3.0 or Local version fo EJB 2.0

306 byte By saravananppsa at 2007-10-3 6:56:20
Hi All,Hope so every body doing well, How do we handle this Service Locator Pattern,If the EJB 2.0 contain Local interfaces or EJB 3.0?.Becuase the Handle might not there.Please help me.How do we go with this.Advance thanks any suggestion or information.Thanks- ...

State pattern and Method delegation problems

976 byte By sri1025a at 2007-10-3 7:09:48
Hi,I have an abstract class, let's name the class Super and Super provides a lot of protected methods with default implementation for it's child classes. And Super is in package com.mycompany.superpackageNow, I have a class that extends Super and let's name it Child. Child class uses State ...

Good book about design pattern / GOF

22 byte By hkblackcowa at 2007-10-3 7:15:23
Any suggestion?

patterns on static objects by meta-java means

2446 byte By valjoka at 2007-10-3 7:24:38
Consider a Gui, which controls some model. It may have listeners or strategies/templates observerving and reacting on the model changes. By running different programs, you invoke different strategies.The conventional way for coding two programs in java would be to instantiate a Gui and pass ...

Observer Pattern

394 byte By rajpuniaa at 2007-10-3 7:27:55
Hi FriendsI have got one strnge Problem.I have got two Clases1>Door2>TimerOn some specified duration My door has to close suppose it is 15 sec.Also I have got two type of Doors a->Slidingb->RotatingMy Question is how to make them in class and what pattern will be more feasible to ...

which is correct SIngleton thread safe implementation?

1185 byte By javatoucha at 2007-10-3 7:28:11
Hi all,Does the following implementation represent a perfect thread safe implementation? public class Singleton {private volatile static Singleton test1;// Private constructor suppresses generation of a (public) default//constructorprivate Singleton() {}public static Singleton getInstance() ...

Design of a Java wiki plugin

1223 byte By LiquidShadowa at 2007-10-3 7:30:39
Greetings to all,I didn't know where I had to post that question exactly, so I've choosen to write that here. I hope I've not mistaken.So, I'm developing a plugin for a wiki clone (media wiki) and I've thougth to implement it as a web service because it can be resident on another host than ...

Where should you acquire the DAO class?

2169 byte By fmarchioniscreena at 2007-10-3 7:45:37
Hi all,I'm implementing the DAO pattern to interface my Session Beans with the DB.import java.rmi.*;import javax.ejb.*;import java.util.List;import java.util.*;public class FlightBean implements SessionBean {SessionContext sessionContext;public void ejbCreate() {}public void ejbRemove() ...

usage of static

1492 byte By Cinimooda at 2007-10-3 7:55:15
hi,i have a class DepthSearch that runs an depth search algorithm on a graph.The DepthSearch class provides the method search(Graph, node), which returns an boolean whether the node exists or not.now i can realize it in two different ways:1. make the searchMethod staticand invoke it like int ...

how fast is the observer pattern?

781 byte By Cinimooda at 2007-10-3 7:55:17
hi,let磗 say i have a graph with thousands of edges existing.Now i delete some of them, but i do not remember, which ones are deleted. Deleting should mean in this case i mark them as deleted, by setting a specific flag of the edge object to true.If i, lets say "push a button" then i want all ...

monitor sizes, resolutions and programmer's preferences

1659 byte By sri1025a at 2007-10-3 7:58:05
Hi Everyone,I am not sure whether this is the right place to post this question, definetly not a design problem but more of developer productivity and personal preference issue. Okay, let me explain my question.I am definetly not a marketing manager trying to sell monitors to computer firms. I ...