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 ...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
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
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
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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.
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 ...
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 ?
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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
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 ...
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 ...
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 ...
Is there any other advantage of using static methods, other than the reason that it is not required to instantiate the object?
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
... 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 ...
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 ...