537 byte By
sk9a at 2007-11-26 13:47:11
Hi,Does anyone know how the DAO pattern looks like when it is used for a data warehouse rather than a normal transactional database?Normally we have something like CustomerDAO or ProductDAO in the DAO pattern, but for data warehouse applications, JOINs are used and multiple tables are queried, ...
I currently have a client server application but looking to optimize the framework. I came across an article online that talks about a architecture that I am interested in but the code listed is lacking. Does anybody have any examples of this channel/device ...
Now Im not sure If I am in the Right place for this question, So if Im not can someone please reply anyways....Ok here is my problem, I have A remote Keylogger and when I fill in the emails and such to which the info is sent to, There is A Test Button to test the email...So then I get a Error ...
4508 byte By
dufera at 2007-11-26 13:54:15
Hi experts,I've this code and the following is the output:class Combinations implements Enumeration {private int lo, hi, n;private int[] c= null;private int[] init() {c= new int[n];for (int i= 0, j= lo; i < n; c[i++]= j++);return c;}private int findPivot() {if (c == null) return 0;for (int ...
1407 byte By
jmw71a at 2007-11-26 13:55:36
HiI have 2 classes, Order and OrderItem. An Order can have one or more OrderItems.Further i have written two DAO's for the mentioned entites, OrderDAO and OrderItemDAO.For several reasons i want to lazy initialize the relationship:public class Order { /*** Getter for the OneToMany-relation to ...
467 byte By
minkeya at 2007-11-26 13:58:55
Hi All,I am new to patterns and have started understanding them using the Head First Series.I would like to know what all design patterns are there in JDBC?Can i say that JDBC uses a Facade design patterns as it hides the database specific details and provides us a interface which helps us to ...
357 byte By
texasa at 2007-11-26 14:14:18
Hi all,In my project I am using Struts Framework, Business Objects, Transfer object, DAO design pattern, View Helpers etc.I want to understand the relationship between these classesForm-Action-Service-BusinessObject-TransferObject-ViewHelper-DAOCan anybody explain me the relationship between ...
1749 byte By
mhhdudua at 2007-11-26 14:17:05
I want to use 2+ DAOs in a transaction. I don't have a transaction manager, so I would like to only use one connection object to execute the transaction. How do I pass the connection object? Where do I create the connection? Where is the transaction started/ended?Solution 1:Use a business ...
Hi,I want to know exactly what certain actions do in order to emulate some of it programmatically while testing.Specifically, I want to know what happens when I push a swing button, type characters etc. without guessing and println-*** inside overrides.Is there a way to tell the program to ...
Hi,i'm developing a web-application based on struts and hibernate.I'm looking for patterns, best-practice, framworks or examples how to save, or more important, how to organize images or media-files uploaded by users in general. How to solve the mismatch between hibernate-pojos and the images ...
HelloI think this is the right place for this...anyway, so being a new hire I'm trying to get the new operation onto the unit testing bandwagon. I've met with success from management, which is good, but the project is built in such a way that makes unit testing extremely difficult.There are 2 ...
Hi all,I have an EJB which connects to an external system (written in Perl) using plain HttpConnections and posting HTML content.I would like to centralize this access using a design pattern.Which pattern is would fit this scenario ?I wonder if I should use the Adapter pattern or the Bridge ...
1060 byte By
mhstava at 2007-11-26 14:34:05
Hello,I am at the moment working on a editor for a configuration class. The class has several lists, some trees and objects some lists share references to object other lists and/or trees. The editor shows the structer in different views, be it either lists, trees and/or comboboxes (depending on ...
824 byte By
manu212a at 2007-11-26 14:46:49
I'm new to OO programing so am seeking some design help. I need to write a process which will parse an xml file and generate POJOs. The problem is that the structure of the xml file changes quite a lot. Sometimes some attributes are there, sometimes not. I want to define rules for my POJO ...
3603 byte By
ssv45324a at 2007-11-26 14:58:05
I have the following class file which is a singleton and also relads the properties file synchronously(reload() method).Can you pl. suggest if the following code is correct?public class PropertiesFile{protected static PropertiesFile instance = null;protected Properties m_props = null;private ...
736 byte By
mhhdudua at 2007-11-26 14:59:40
Let's assume I have the following database configuration:-1 Master Database-2 Replicated Databases (from Master)Do I have two types of DAOs? One that's writable (accessing master) and one that's read-only for access to replicated DBs?E.g.WritableFooDAOReadOnlyFooDAO*** OR ***How about ...
I am having a class hierarchy and a factory method that creates the classes from this hierarchy. The factory method returns the root class of this hierarchy and every time I want to use a class specific method of one of the sub classes I will have to check the type of this class and cast to ...
580 byte By
N3ila at 2007-11-26 15:49:51
Hope someone can answer this one simply for me :)If one object has a list of references to all of its child objects, and needs to know about changes to those child objects, which pattern would be best to use here?I had thought observer, but this is defined as:Define a one-to-many dependency ...
I m using HibernateDAOSupport provided in spring framework to access database.The response is very slow.Can anyone help me in this regard?
Started fooling around with some industry-specific software implementations. In one software design document, I came across a reference to an old familiar term "design patterns". This part of the text was describing XML Schema Design Patterns. Below is the first paragraph, which made me laugh ...
1654 byte By
jdupreza at 2007-11-26 16:06:24
Hello,I am building a client/server app, the client is a Swing application.The client needs to read/write information to the server. I have a set of "DAO" classes that encapsulate remote acces:package myapp.client;public class OrderDAO {public OrderDTO getDaylyOrders();public void ...
http://home.earthlink.net/~huston2/images/GoF_full_medium.pngWell, I larfed, anyway...
Softwarejboss 4.0.5JDK 1.5_06ProblemI have a Stateful Session Class which till now was used as a normal Desktop Client but now I am trying to convert this class into Stateful Session class.So to convert that class into Statefull class in such a way that the same class can be used as a normal ...
5481 byte By
Saisha at 2007-11-26 16:34:43
All,Good to be back, and I thought I would start a thread on whether it is better to go the JSR 181 route (Java-centric using annotations and a POJO or EJB to generate web services) or the W3C WS route (XML-centric using schema and/or WSDL to generate a Java component model). In short, build ...
OK, so everyone knows what exception handling is in java:try {throw new Exception("Error!");}catch (Exception ex) {System.out.println("An error occured: " + ex.getMessage());}...but what if I want to throw an exception that is not fatal--i.e. my program can continue with its normal operation, ...
I am planning to use Validation Framework in my project (non-struts based ) for the form validations. But I am not too sure about the performance issues I am gonna face bcoz of this. Since its a banking application so any response beyond half a second would not be bearable.Please share ur ideas ...
346 byte By
_dnoyeBa at 2007-11-26 17:03:19
Are there any patterns out there to manage incremental change of a system. I have a drawing and I want to manage its changes. Rather than processing the whole thing from scratch every time, Id like to store the already processed stuff, and only introduce the delta for each subsequent ...
1201 byte By
o9ipa at 2007-11-26 17:11:58
Hello,I抎 like to ask for your help in the following design issue:I need to create an email sending web service (with Axis). Only just one method which returns with an integer return code. This handles the following:-based on the given parameters gets the email addresses from an LDAP server ...
Hi all,Sorry if it's a newbie question, but I didn't find the path to solve this problem in the forums, so I put this question:I have many threads that may run simultaneously with need to access field values in a class instance that control some counters. These threads should access these ...
405 byte By
Tatona at 2007-11-26 17:37:21
Dear Friends,One of my company's application is now having performance issue.It is made in JSP 1.2, Java 1.4, Oracle 8.1.7. It is running for 2 years but now it is logging out automatically and also user are getting login,they have take many tries. Mostly this problem is severe at 5 pm.What ...
Sorry for the sorry subject line, could not think of anything better.I am working with an architecture that has two layers. Let's call it Outer and Inner. Outer layer provides "command"s to the Inner layer, which then processes them and provides the "result"s back to the Outer layer. The ...
If I've a TransactionManager class that's a singleton; meaning one manager handling clients' transaction requests, do I need to synchronize all of the instance methods within that singleton class? My understanding is that I should; otherwise, there's a chance of data corruption when one ...
691 byte By
MargNata at 2007-11-26 17:50:23
Hi,I'm using MVC pattern.I've understood it, and I be able to use it, but I've some doubts.Practically, in the view I have the update method;Now, my view interact with many models, which advice it by executing his update method.But in this update method, I've various pieces of code;one for ...
The problem statement isThe Annual sports day for a company is held annualy. Each department of the company can represent members to take part in various events.An event can be official/demonstration. Official events earn medals. An event also can be a team event or a individual event.A ...
1539 byte By
jakain2a at 2007-11-26 18:10:05
I have 4 different xml message types that I must post to a service. 3 of these message types can be sent asynchronously but 1 must be sent synchronously:These types can be sent asynchronously:CreateUpdateDeleteThis type must be sent synchronously:RetrieveNow the problem is I must throttle the ...
any Design patterns is using in XMLBeans.
737 byte By
meaobaoa at 2007-11-26 18:50:17
hi guys,My graduation project is on design patterns & how to develop a CASE tool to use each design pattern & modify it according to the developer needs !!!But i have a question please !!! How can i implement a design pattern with java code !!! for example there's a pattern called a ...
1843 byte By
MargNata at 2007-11-26 18:53:07
Hi,suppose I've this model class:public class MyClass extends java.util.Observable {public MyClass(){}//get methods...//set methods...private int x;private int y;private int z;private int t;private int s;}Now I want that, when I use more than one set method, observers are notified only one ...
86 byte By
ravynza at 2007-11-26 18:55:33
what is aggregation and compostion ?why is the need for these concepts ?
Hi, If I have a a couple of different Views which are created by a couple of different controllers what would be the best way of adding these to a main frame. For exampleView1 extends JPanelView1Controller creates it.View2 extends JPanelView2 Controller creates it.MainFrame extends ...
829 byte By
Holoda at 2007-11-26 19:07:25
Good day.I have a question, what is the best wat to design desktop application.The aim of it is to connect to DB, get some data, insert some data, update some data.This application will be like a small business model of my department.It will help to control the state of incoming and outcomming ...
276 byte By
Basha at 2007-11-26 19:10:05
Can someone please help me with real life pattern example by following the below given rule.A pattern description must address the following major points: Pattern Name and Classification Problem Solution Consequences Known Uses
what are the advantages of SingleTonepattern...?
1216 byte By
mspa at 2007-11-26 19:19:34
Hey guys,I am currently playing with a j2me application. I am (of course :) ) implementing an MVC pattern and as I have little experience I was wondering:How would you implement the model internal state?I mean the application would normally have more "screens" which belong actually to one view ...
Hello,I'm working in a Financial application.We use WebService as main datastore.So, i designed a facade for WebService integration into the Application.With a SOAP engine (Axis, Xfire) a have generated Class representing the message info and request/respond for the webservice.In the ...
1656 byte By
es5f2000a at 2007-11-26 19:27:23
My new employer has no current standards for data validation.Basically, there's no parameter checking and no usage of assertstatements anywhere.I've decided we need a library to facilitate a transition to a moresane environment. I have two questions:1. Is there any prewritten library, or is ...
Hi...,In one of our application, we are thinking to separate the Web Layer(Jsp/JSF) & deploy it on the Web Server , EJB's on the App Server. My question is ,-what benefits does it provide having such separation?-When should we decide to separate the web tier from the application server?- ...
3590 byte By
ntalamaia at 2007-11-26 19:56:03
I am using a library and I would like to extend one of its classes. My class "is of type A" and instances of A_Extension should be used whenever an object of type A is expected. Therefore the proper solution is inheritance.More specifically:import library.A;public class A_Extension extends A{ ...
Hello everyone,I'm working with a WEbService using Axis1 generated client code.Can anybody give me a good linkg to a Design pattern to use such generated code.Regards,Sebastien Degardin
813 byte By
kmkiania at 2007-11-26 20:08:16
Consider a typical synchronous Struts-based Web application which does a simple DB search and post. What are some of the main patterns and components that should be used if following the 搃ndustry best practices?br>Does the following flow seem accurate?Strust Action creates a TransferObject , ...