More DAO Confusion

2388 byte By nootcha at 2007-10-2 15:47:33
If you are not familiar with this pattern, it is outlined here: http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.htmlI have read through it and even begun to implement it, but am running across some concerns. I would like to know if these concerns are due to a ...

Exception package

720 byte By nantucketa at 2007-10-2 15:53:57
I've been working with custom exception classes, that is classes which extend from java.lang.Exception but have slight additional functionality and have more descriptive names. I've been keeping them inside whatever package seemed appropriate given the nature of the exception. So for example ...

What pattern is employed for ServletRequest, ServletResponse ?

281 byte By sureshnatha at 2007-10-2 16:08:21
Hi,I am trying to figure out , what is the pattern employed to define the ServletRequest, ServletResponse, HttpServletRequaest and HttpServletResponse interfaces in the Servlet API. I couldnt find out until now. Any answers will help.ThanksSuresh

Dynamic .JAR loading

635 byte By oturcoa at 2007-10-2 16:10:27
Hi All,I am not sure if this is possible, but my problem is briefly;I have to use xxx4.jar library for my application and I used it perfectly, but then the third party published the newer version of the library that I used as xxx5.jar. None of the interfaces has changed but only one of the ...

Constructor-choke variable encapsulation.

5016 byte By Drake_Duna at 2007-10-2 16:19:57
I have been chewing over the idea of using constructors which take a single complex object roughly equivalent to a "transfer object" as a means to achieve a sort of flexible encapsulation, and I was wondering whether people would think it is a good idea.Example.public class Bomb {private int ...

Compare Servlets and EJBs for web applications

631 byte By java_sta at 2007-10-2 16:20:16
Hi, I have a set of queries regarding servlets and EJBs1. Can we use EJBs for developing web applications?2. If yes, Can we replace Servlets with EJBs when we are talking abt developing web applications?3. Which kind of server design is best for developing a Conferencing server kind of product ...

Reverse Engineer

469 byte By mani2k_ina at 2007-10-2 16:20:44
Hi ,This question is not about design but someting related to design activity.I have been assinged with a duanting task of reverse engineering i.e code to model and have to represent the flow of the business services as sequence diagrams.Is there any tool where i could do a reverse engineering ...

Sorting and filtering design question

2202 byte By oturcoa at 2007-10-2 16:21:32
Hi All,I have several list of POJO classes like;public class Person{private String name;private String surname;private int no=0;public String getName(){return name;}public void setName(String name){this.name = name;}public int getNo(){return no;}public void setNo(int no){this.no = no;}public ...

Spin/Promela

231 byte By cakea at 2007-10-2 16:21:45
HiAnybody done any model verification with Spin/Promela?Looking for a good resource/forum as I am stuck with a project and cannot find anything useful, apart from the spinroot website itself!Thanks, cake

design pattern

188 byte By ajseajsea at 2007-10-2 16:26:21
Hi all,I want to know what is the difference between factory pattern and builder pattern.Please express your views.Both are looking same to me.with regards,ajse

finding design patterns from Model or P.E file

353 byte By raghavaa at 2007-10-2 16:26:41
Hi,Are there any tools or APIs that take a model (as XMI probably) or a P.E file (so in effect, source code won't be available) and give the design patterns that were used in the model ? Which classes participate in which patterns and related info ? It could probably be one of the stages in ...

Designing with many servers, and one central server

2433 byte By lightbulb4321a at 2007-10-2 16:26:43
Was thinking about the following theoretical scenario. What might be some good options for structuring it?- Let's say there are 10 clients on 10 computers in a given physical location that need to share data and communicate, so 1 of the 10 computers becomes a central server for the 10. This ...

Web Page and Database Design Problem

1214 byte By devdaveja at 2007-10-2 16:29:02
Ok, so I'm trying to develop an app, but am having a few problems and need some advice/help.I have a webpage made up of jsp pages. These pages will contain forms that will either list info from the databse, or allow users to enter data to submit to the DB.So I will have Servelts that will ...

Facade Pattern

467 byte By rajpuniaa at 2007-10-2 16:32:23
I am having one bean whichis having methods=========>setName()setAddress()setPhoneNo()instead of setting individulalyi am writing datafacde(string name,String address,String phoneNo){//doing initialization with this}My approach is calling datafacde() method with the attribute instead of ...

Impementing the Decorator Pattern for a large super class

1640 byte By eclipsicala at 2007-10-2 16:33:56
Say I want to make some JComponents that change colour when the mouse cursor is within their bounds. I'd like to do this for several components, so I'd probably use the decorator pattern. However, overriding all the JComponent methods in the abstract decorator class to call the associated ...

Singletons

1041 byte By teresaswarthouta at 2007-10-2 16:40:12
I've read several forum postings on singletons, but still have several questions.We initially created our singletons using eager instantiaion, but discovered that this did not work on our target hardware which is a multiprocessor machine. It seems to me that our only choice is to use a ...

Velocity

1042 byte By ssv45324a at 2007-10-2 16:43:42
I am wondering if this is possible in a velocity module - <code><tr><input type="radio" name="positionType" class ="radio" value="New" #if ($positionType == "new") checked #end>New <input type="radio" name="positionType" class ="radio" value="Replacement" #if ($positionType ...

JList Problem

14382 byte By imranksa at 2007-10-2 16:47:06
Hi all,I have developed a simple chat application and I am having problems updating the onlineUserlist dynamically after a user logs inor a user logs off.As you can see below the contacstFrame class implements the ListSelectionListener, ListDataListenerMy problem is that i don't know how to ...

DAO WITH STRUTS

408 byte By matam.praveena at 2007-10-2 16:48:29
server.xml is <Context path="/WebForum" docBase="WebForum" debug="5" reloadable="true"crossContext="true">..... <Resource name="jdbc/WebForumDS" auth="Container" type="javax.sql.DataSource" /> <ResourceParams name="jdbc/webforum">what is 1)docBase=" " ,2)Resource name=" " and ...

Doubt in Observer and Observable Pattern

186 byte By Rajesh_1981a at 2007-10-2 17:01:37
Hi Friends,I am new to java patterns. can any one please provide me the simple examples for Observer and Observable pattern.Thanks in Advance,Rajesh Kannan. N

Regular Expressions

158 byte By Alacran_xDa at 2007-10-2 17:02:12
I'm working in a regular expressions which could control the sintax of a SELECT sql query but I can't manage. May I ask for some help? Thanks.

Singleton pattern question.

3471 byte By amitteva at 2007-10-2 17:04:40
Hi guys. I`m developing a factory that has a factory method. The factory method receives a string (colorname) and retrieves its code from hashmap. I have two solutions. The first one is:public class ColorFactory { private static HashMap colors=null; private static initializeColorsMap() {colors ...

how to get a object's size in memory

74 byte By fentaa at 2007-10-2 17:07:47
hi! i want to get a object's size in the memory ,can you help me ?

Synchronized singleton

1109 byte By amitteva at 2007-10-2 17:08:08
Hi guys! I`m writing a class that is by singleton pattern.publi class MyClass { private static MyClass my = null; private Myclass() {... } public static MyClass getInstance() {if (my==null) {my = new MyClass();}return my; } }When the first time the method getInstance() is invoked, if two ...

Looking for book: Applied Java Patterns 2.0

363 byte By blackbuzoa at 2007-10-2 17:08:43
Hi there,I've heard of a Design Patterns book with the following information:Name: "Applied Java Patterns 2.0"Author: Stephen A Stelting ISBN: 0131858432Publisher: Prentice Hall PTR - 2006-01-31However, I cannot find it anywhere (yeap, is not in amazon either).Has anyone ever seen this ...

Please Critique My Rough Design

3753 byte By ktm5124a at 2007-10-2 17:09:21
I'm not going to post my entire design, as in the entire UML drawing, the reasons being 1) you simply can't post pictures and 2) I don't need a critique of the entire design, just some of my ideas. With that settled, here are my ideas for the object communication in an instant messenging ...

why jvm crashes if I invoke GC every 20000 allocations

614 byte By terryxiana at 2007-10-2 17:09:54
I am doing a project related to object's lifetime. I modified JVM code to force garbage collection every 20000 allocations (i.e., every 20000 objects have been allocated). In my code, I used a global variable total_objs to track how many objects have been allocated so far.I added the following ...

regarding configuration tools

346 byte By fun-braina at 2007-10-2 17:12:52
hi,i developed a web application..now i want to develope configuration wizards,which configures my product at client side.it should take care of available modules in my product.it should add selected modules,and if need it should add plug-ins too......any tools available to develope such a ...

Facade, DAO, DO

317 byte By Manoj_Screena at 2007-10-2 17:13:25
I want to know about:-1) Facade2) DAO3) DO, terms.and how they are linked with each other.Can u reflect any relationship / architecture between them?A whitepaper or an e-book would be very helpful for me.e-mail: manub22@rediffmail.comThanks, Manoj ...

Multiple Versions of a Spec: Decorate, Inherit or Transform?

1416 byte By Saisha at 2007-10-2 17:16:49
All,We are trying to do a mapping component between our object model and a third-party standard (XML-based). There is an organization in my industry that has created a XSD specification for the transmission of data. It is full-blown with every conceivable aspect of our business contained ...

I want to run java program on windows environment as background process

1348 byte By ravindra.shuklaa at 2007-10-2 17:22:06
Hi all I want to run java program on windows environment as background processSo command promptreturn after executing java command and program on background In Linux we can do this easily 卋ut I do not how to do this in windows for example look this programe import java.io.*;import ...

System scalability issue

813 byte By amit230978a at 2007-10-2 17:22:31
Hi,We are in the process of developing one application which will be used to upload several feed files (Excel and CSV format). These files will be processed at the application server side using POI (to read excel format) and than after certain processing, it will be stored in the staging tables ...

Please tell the right tool for managing the Version of JSP pages

228 byte By jaitsaha67a at 2007-10-2 17:27:08
Hello Friends We are developing a software for hospital, we need to maintain versioning of the software. Can you give information about the open source version management softwareThanking YouAjit Saha

I would appreciate advice on technical choices for a large web application.

1741 byte By jtp512a at 2007-10-2 17:30:24
Application Server: Sun Java System Application Server Platform 8.2JDK: J2EE 1.4Database platform: Oracle 9iI am currently in the middle of designing a large, not enterprise, web application.At this point, I have the requirements, ERDs, UML diagrams, several initial JavaBeans and POJOs ...

Sorry for asking, but i'm confuse.

558 byte By yantoa at 2007-10-2 17:30:34
hi i'm quite new with java. and just recently i learn about J2EE pattern.but when i try to implement it to JSF. i got confuse. so my webpage have all coding put into 2 bean. one for access database. and one for other. Can anybody please explain to me how to connect a Front Controller, View ...

Velocity initialization and use logs

253 byte By gelorta at 2007-10-2 17:38:47
Hi, allI have several questions1. When i initialize Velocity, procedure init() generate logs file(default name velocity.log). Is it possible use Velocity without log file? 2.How do cut off log file for Velocity? Thanks

factory question

3029 byte By LumpyNosea at 2007-10-2 17:44:54
I have this interface:public interfaceUserInfo {public StringgetUid();public StringgetKps();public StringgetName();public List<String> getRoles();public StringgetMainRole();public StringgetClientHost();public floatgetBalance();public List<ChargeKey>getCharges();public ...

Singleton Question

1501 byte By Hrishikesh_Ghatnekara at 2007-10-2 17:51:33
Hi,I am trying to create one singleton class and planning to use it in my application.My question is what will be difference if I try to access the methods of the singletone class in following ways1)Singletone.getInstance().methodName()2)Singletone.methodName()In Second case how come the ...

class diagram design problem

412 byte By Java12a at 2007-10-2 17:52:38
hi everyone,I am doing an application in java and it is not web based, it is a client and server based application.If i want to draw a class diagram for a client and server based application, would i only draw the client side or both sides?i am a little confused, because when i read about class ...

Question about static methods.

133 byte By ssv45324a at 2007-10-2 17:54:52
Is there any other advantage of using static methods, other than the reason that it is not required to instantiate the object?

Design question.

851 byte By ssv45324a at 2007-10-2 17:55:06
Which is a better design?We need to present data to a user. So to do this we decided to create a view(database) which is join of two tables so that we can avoid some heavy duty computution in the presentation layer. There is one more information which we need to present in this layer. This ...

Can we call this design pattern as session facade?

613 byte By itechminda at 2007-10-2 17:57:34
Hi,In my application, I am using struts framework and EJBs.My Action Servlet accesses session beans which are developed to access Entity Beans.My problem is, I have some well built Business logic classes with methods accessing Database to fetch, update so on. I want to use use these methods ...

Handling multiple DAOs

1725 byte By svevoa at 2007-10-2 17:59:00
I've been asked to develope an ejb module to handle online orders for an e-commerce site.When in production the module will interact with other modules that handle customer profiles etcetera but it must have absolutely no dependency to other modules and it must be decuopled from the business ...

Design Question

579 byte By dumsa at 2007-10-2 17:59:53
I am working on a web applictaion where the user applies for a loan and it is a 12 step process . We are using front end struts, ejbs ,dao layer and oracle database for persistence. I need to persist the data for each client during the loan application process for each step of the process, ...

Data Modeling - Forecasting (Probability)? Question

1273 byte By orozcoma at 2007-10-2 18:00:00
Ok, First of all I took a probability and queuing class back in college ages ago, and I don't remember any of it?! My boss want to create a data modeling - forecasting application for our company. Now our company is very big, and is spread out accross the world. We are a company that deals ...

Newbie inheritance question

514 byte By kalantvaa at 2007-10-2 18:00:28
I have created a base class which implements cloneable (and I know the clone function works). I have also created two classes derived from the base class (which don't have cloneable implemented).Is it possible to "clone" the base class components of both derived classes. Here is what I ...

How prolific should I be with classes? (A-Life example)

1486 byte By Asbestosa at 2007-10-2 18:00:47
I'm currently writing an artificial life program. Currently I have classes related to neurons, networks, creatures, and environments.Now I'm putting together my creatures. Creatures have eyes, ears, touch sensors, wheels... there's no limit to what a creature can have. Each of these ...

Multiple function signatures in .tag file

1074 byte By lucboudreaua at 2007-10-2 18:06:38
I'm writing a jsp .tag file and I've encountered the following problem. I have those two functions :private void iterateThroughChildElements(Element element){for (Iterator i = question.getElements().iterator(); i.hasNext(); )this.parseAndDisplay( (Element) i.next() );}private void ...

A complexer example of mvc ...

723 byte By der_mattia at 2007-10-2 18:10:41
... than every book shows. I'd like to ask you, what do you think is a good oo-design, using the mvc pattern.Suppose you have a data class (e.g. TelephoneBook) and you want to show its data in JTable and in a JList.TelephoneBook could look like this:class TelephoneBook { private List ...

Generics and Method overloading

1141 byte By ccapitoa at 2007-10-2 18:10:58
Hi there!I'm testing the Generic water, as it were, and have prompty stubbed a toe.I've got a class called Table with a method getColumns() that returns a list of Columns:public class Table {... public Collection<Column> getColumns() { ... }}I want to subclass Table and let this ...