Designed an Exception classes for my application.I have BaseException class extending java.lang.Exception. "ApplicationException" and "SystemException" again extend from "BaseException".DAOException extends from "SystemException".My question is,Do I need throw all exceptions from DAO, as DAO ...
Hi all.. just wanna seek some advice on what is the best way to implement a data cache? I'm using a DAO and would like to put my cache in between it and my database, I'm thinking of using a hashtable to store key value pairs. I've tried to search on the net but i cant seem to find the best ...
HiI didn't find a forum talking about Logging or AOP so my question is about how can i find an AOP implementation of Logging (Monolog especially)Thanks.
Dear experienced programmers,We hope to store all emails flying back and forth on a corporate network.To make sure we are not storing duplicate emails (for instance, where the cc field contains hundreds of addresses) we want to MD5 sum the body, attachment text, and selected parts of the ...
309 byte By
amateca at 2007-10-1 17:14:40
Hi all,I need an advice from you. Suppose I have an EmployeeBusinessBean (POJO) and I want an instance for employee 1. Should a I have an static method like findEmployee(long pk) in this class or have something like a BusinessBeanFactory and put this method in ...
i try to write a new class, but i am not very sure if there is only one new class, I shall write a Movie class or a Ticket class?this is my Movie class, if I also want to write a new Ticket class. and still i don't know how to writebecause the Ticket class uses some of the attributes of the ...
Experts, I am new to the forum on posting messages. I used to watch and get help from the forum a lot. I need answer from you guys on a specific requirement.We have an application used by 2 different set of users. 1. Agents 2. Customers.The application arch should provide more rapid access to ...
391 byte By
pks27a at 2007-10-1 17:27:20
From browser, my application receive some data. In code I validate input data and need to return error if validation fails. Which is better approach ? 1) Return Code. 0 for successful and non-zero for error2) Throw appropriate business exception for error and normal termination of method in ...
Does anyone know of any free open source Java math equation editors around on the web? Please feel free to send me an email at lchucky101@gmail.com. Thank you very much.
LANGUAGE: ENGLISHHello boys, give me an help for a project!I have to realize an interface between an applet and the server by RMI technology. I need to save changes of an experience base on server directly from applet. The applet that view the experience base have a tgLinkBrowser based ...
217 byte By
devesaa at 2007-10-1 17:31:48
Hello,I have class B and C, both extend from class A. THEN, if A depends on D (and I have put it in the class diagram)... will I have to put that B and C depends on D too (because they do)?Thanks!
hi all,i have set of unit test cases for my project, i need to know when i run my build script (ant) i need to run all my unit test cases if all the unit test is successful then only my build should be successful how to achive this using ant i am open to use other build tools like marven also, ...
I'm new to JAVA DESIGN PATTERNS.Can someone tell me exactly in what situations a singleton pattern is used?i know that it is used when u need to create a single instance.But when do such scenarios arise?What are the advantages of Singleton?
i mean as the coding below-class Constructor 1{}class Constructor2 extends Constructor1{}if it is true, how java represents the dependency as "extend" and "include" of Use Case ...
700 byte By
alainba at 2007-10-1 17:44:54
Hi all,In a application using DAO to query database, there's a GUI where the user can basically create his own WHERE clause. Explication: 1- Drop down box where he select the field ( Company name, Control number, Date of arrival...) 2- Another drop down where he specify the filter criteria( ...
Hi experts,I have been programming in Java for a while but I'm relative new to system design. I was asked to write a web-based system to manage student information (such as marking their test result, generate reports based on the marks).In the end, I would like it to be able to use by multiple ...
I'm playing with Transfer Objects for the first time, and have got this one class I'm not sure how to design the Transfer Object for. The problem is that I have some logic that is needed by both the domain model and by the client.The class is named Moment. It's basically a wrapper around the ...
263 byte By
sm8aa at 2007-10-1 17:50:40
Hi, I often got confused to identify when is better to use a singleton instance and when is better use a static class insted. Could someone please advise what criteria should be observed to decide which way is better?Thanks in advance,
hi all,we r in design stage, Our application has a requirement as follows, related to diagnostics, when user selects option of diagnostics, MQ Series message needs to be sent to Queue, so that other component performs some action, take the output of that component and give that one to another ...
Three needs to be a communication developed between Java Websphere based App and VB Client Server App.Both of these on different systems. A file need to be sent from Java App to VB App where further processing of the file is done and sent back to the Java App. A preliminary consideration is ...
I have a system written in java which i run in the form a collection of seperate processes of which there are three in total. One process reads xml files and writes data to a database. The other two collate data from a couple of different databases and then merge the data in a different one ...
1049 byte By
regita at 2007-10-1 18:05:17
I am working on an inventory system and am designing a Client Service Facade for the Presentation layer to interact with. My question is where to put the validation code when inserting or editing clients? I see two options.1. The validation occurs inside the ClientService.insertClient() and ...
Hello all,I'm having some doubts about the right 'choice' of interfaces. I'm designing a little library for graphs and I was thinking about the difference between directed and undirected graphs, and how I should reflect this in the library. My apologies for my bad English.There is a small, ...
one pass x a value in a method;another not;are there any differences when using them?===========class ConstructorA{int x=1,z;public ConstructorA(int a){z=a;}}class ConstructorB{int x,z;public ConstructorA(int ...
Ok I am having a problem. But let me first give you the background:I have a BaseDAO in which Connection is encapsulated:public abstract class BaseDAO {private Connection _connection = null;public BaseDAO( Connection connection ) {this._connection = connection;}public Connection getConnection() ...
*I put this topic in the Patterns forum because of the concern of the JS design*I've posted several topics in this forum and others about the JavaSound API. My main question was how could I rewind and fast-forward streams of data (AudioInputStreams) to create a seeking-function for my playback ...
Hi,We are developing a third party web application which will used by our clients. Our application will be hosted at our place and users of our clients will access our application. Our clients have their own application from which their users will access our application. Our client application ...
i think there will be to kind of waysA.write a main method call all the other methods in that class Nlike class N{.....main{}}B.write a test class for every class, name as N_testclass N_test {......}or any other better way to write test porgram in ...
in rational rose class diagrami found i cannot apply multiplicity for a generalization relation linei think it is for the reason that each subclass must have the relation with superclassso it is 0..* by nature, therefor, no need to redefine, am i right?
under this patternis the observer usually always a view?I want to use it in a thread where it observes if there is a connection or not
I have a question about a specific problem and what the best solution will be. Basically I've been asked to thread safe a file that is used as an authentication (LDAP imitation) file, this file lives on the server. The application starts a server (runs on its own JVM) and a client (that runs ...
1482 byte By
mr_nicoa at 2007-10-1 18:47:39
hello all,i have a domain class Incident that represent a problem or issue occuring in my domain process.i have to implement a occur(...) method that do the work when a problem/Incident occur.I wonder if i should put the occur method in Incident class or outside Incident class.Solution 1:class ...
I've been looking at this a bit, it's a new concept to me. After about 20-30 minutes of reading about antipatterns, I found the topic to be completely useless. Either that or nobody has written about it well.So my question is, is there something to antipatterns? Is it worth studying? Or is it ...
Potentially simple question #1Say you have the following:public class Foo { private String name; public Foo(String name) {this.name = name; } public String getName() {return name;// how secure does this need to be? }Say a user wrote String nameString = new Foo("string").getName();nameString ...
We should DAO pattern with DAO implement call procedure ?Is this couple between persistence and business (store procedure) ?
My Perception :Value Object : This represents the Model(could be mapping to a table)Transfer Object : This holds the Value Object . This object is passed by value(serailizable). This is just a container and a carrier to pass the object across tiers. Pls validate this with your views.Thanks in ...
could anyone please recommend some resources (books, websites, etc) on library development.so far I've been using other people's Java library, or fixing some bugs that might exist.I want to build a Java library and provide the API for other people to use. I'm not sure where to start and ...
Hi,I got a bit of an issue. I am responsible the integration layer between the web app developers and our Entity EJB Model. The initial thought was that i would simply create DTO map to the entity beans to be passed to the presentation layer. Its obvious that at the presentation layer the ...
1548 byte By
orozcoma at 2007-10-1 19:03:33
Let me start off with a brief explanation of what the application should do.Pharmacist Application that manages there accounts on different levels.1. Pharmacist is able to input and manage account information for patients, customers, buyers, and shipping companies - all are Nationwide.2. ...
Hi i am working with struts since 2004 developing an ERP solution, now we want to integrate with another company which has its product with hibernate and faces, my point is that a want to apply some patterns in order to make esaier this fusion, but i am not sure what to apply... i've read some ...
I have to create reports using simple SQLsSQLs have simple SELECT statements only.1]Whats is more efficient?a]actionClass->handler->sessionbean->dao->databaseb]actionClass->handler->sessionbean (session bean having all the database code)c]actionclass->handler->DAO2]First ...
221 byte By
musica at 2007-10-1 19:06:05
I use DAO pattern.I wanna get data from 4 tables, which dto will I use ?Create new dto content all attribute I need ?and create new DAO interface, DAO implements class ?Thanks for rely !
123 byte By
saibalaa at 2007-10-1 19:06:39
there are two objects one can be transfered to other at later stage.in this case which design pattern to use?
Hi, can anyone help me in creating custom data types in java?For example I want a data type to be able to store telephone numbersI dont want to use strings as they can also have a-z values and I cant use integers coz telephone numbers start with a 0.
It is clear that java will apply overridden static data members through-out the entire class inheritance. And perhaps I was naive to think that it would be trivial to override member data polymorphically (I need to explicity override the data values from the contructor, use set/get methods, or ...
i don't know the purpose of pseudocode,but i think rewrite all the java coding to structural english is uselessmost of the pseudocode norm is based on old pascalpascal was designed in 197x, not as java as implement the oo conceptand use the pascal norm to represent the oo concept in java make ...
157 byte By
musica at 2007-10-1 19:13:55
I found some free tool such as : DAO-Generator, mdaog-0.5.3a, dao4j..but all of them is not good. Have free tool good as FireStorm/DAO ?
i have some question about the issue of delay time. for example, i have a web base live quote stock system. you know that every time the stock value is changing, once the stock was changed, each clients will update the stock value immediately. If i use observer pattern to apply the system, the ...
717 byte By
katriyaa at 2007-10-1 19:28:24
I have a HTTP server, to which a request is sent whenever a User logs in/out of our Custom(Desktop)Application. I want to keep track of all the Users who login to the Application(thereby sending a request to the Server)I want a UI to track all the Users. I'm not sure which one of the options ...
511 byte By
musica at 2007-10-1 19:33:35
I write an Web Application follow MVC artchitects. I have a page called : "about.jsp" which do not interact database, it just only html format.It's called by (M1) : http://localhost:8080/MyApp/about.jspShould need through a Controller, for example : aboutAction (which redirect to about.jsp) ...