391 byte By
balteoa at 2007-10-1 3:09:52
Hello,Can anyone tell me what the difference is between this type of association:|class A || Class B|and this one:|class A |<->| Class B|I understand the second one is a bidirectional association. What I don't understand is how these association translate into java. Can anyone help me ...
188 byte By
balteoa at 2007-10-1 3:09:53
Hello,Can anyone tell me how to represent java generics in UML? Say I have ClassA<ClassB>. How do I represent this in UML?Thanks in advance,Julien Martin.
3526 byte By
D.Bollaa at 2007-10-1 3:10:33
Hi everybodyI would like to share some thoughts with you and have an opinion about it having in mind that what we talk about is a design pattern.- The issueWhen we are dealing with medium/big programs (a hundred or more Classes with various relationships between them) there are two issues that ...
k, so I have a for() loop that I want to take the value of String fs1 through String fs21 and add them in that order to a String fs. So, my question is, can you do this in a loop? you can do it in PHP, and that's what I'm accustom to.this is kinda what I want to makeString fs = "";String fs1 ...
296 byte By
leemon2a at 2007-10-1 3:16:58
Hi!I have a doubt regarding use cases. Something like "Change user interface language" would be eligible for a use case ? I mean, this action doesn't involve any object in the domain layer, it only affects the presentation layer. Can someone shed some light on this issue, please ?
Hello,I am currently attempting to learn UML2 standard in a class I am taking. It seems that there are a lot of benefits and downsides to the modelling procedure.I wanted to ask the developer and the academic community about how they view UML2 and how effective it is from an industrial point of ...
I have a design problem where I'm redeveloping the front end of our application, and in an effort to reduce coupling and preserve tier separation, I've implemented a Struts plugin which is comprised of "service" objects that use the business delegates to return VO's created by EJBs's. The ...
Hi Folks, I have an application where a certain object is used by many JSPs or Servlets. While using objects, its hard to keep track of the status of that object. Because of that, JSPs and Servlets end up using that objects when its state is not valid to be referenced and throws expception. is ...
1415 byte By
an1xa at 2007-10-1 4:00:38
Hi,Suppose we are creating an addressbook, like the one in handheld computers or mobile phones. We have some people and some categories. There is a many-to-many relationship between them. Person simply has a name and phone, and category has a name.I am not considering the presentation tier. ...
580 byte By
_AM__a at 2007-10-1 4:02:03
Hi All,I have one question:Factory pattern, is to create objects based on the class name passed. But, in DocumentBuilderFactory there is a method newInstance(), this returns the object of DocumentBuilder. This method doesn't take any arguments also. DocumentBuilder objDoc = ...
1896 byte By
adamscja at 2007-10-1 4:08:07
You know when you're coding something (or with my case enhancing some existing code written and subsequently modified by other developers) and you just knowsomething is wrong with the design........Well thats where I find myself now.....I'm having a problem with instanceof. Initially there ...
I need to help on the Observer pattern. It's true/false questions:1. The observer pattern lets you vary subjects and observers independently.2. You cannot reuse subjects without reusing their observers, and vice versa.3. You cannot add observers without modifying the subject or other ...
164 byte By
_AM__a at 2007-10-1 4:15:05
Hi, Could you plz. let me know how to integrate cvs or vss with eclipse. or any url which will guide me.. Thanks in advance.. AMJ
13284 byte By
_AM__a at 2007-10-1 4:16:19
when i give the startup command. I am getting the following error:Feb 3, 2005 6:32:24 PM org.apache.struts.util.PropertyMessageResources <init>INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=trueFeb 3, 2005 6:32:24 PM ...
Hello everyone,I have a portal (web) service, and it's job is to receive input parameters from clients' requests, and return specific data by polling another source, in the most general sense. Is the Active Object Pattern appropriate in this scenario? When the task is submitted, the client ...
basically is i need to know is Object[] a subclass of class Object?therefore every array type is a subclass of type Object?thanks in advance
Hi, Though my post doesn't seem to be related to Java, it's in the context revolving around database connection pooling provided by application servers. We are in the process of replicating some databases where most of the operations would be read-only. And there are application servers that ...
I'm using Command pattern to execute a "Service" classes.The executer of the "Service" classes is an EJB,and I need this EJB to be parametrized in properties file.I'm using ConfigUtils to access the properties file.The properties ...
I have a comand bar built from Command objects. The Command knows how to display itself (flat, then raised w/mouseOver, depressed w/mousePressed...). The command bar may be either an icon bar or a menu bar - the Command knows about icons, text names, tooltip text and so on.The icon bar is ...
543 byte By
Chris_Oa at 2007-10-1 4:31:01
I have a system that requires different values to be available to the application, in different environments. We currently acheive this using token substitution. The trouble with this is that each time a value requires updating the application needs to be rebuilt to pick up the new value. I ...
Hello,I'm writing a collection class in which I have a remove method. If the object that the client wants to remove is not in the collection, should the method return false (and therefore have a return type of boolean), or should it throw an exception that the object is not found (and ...
212 byte By
at 2007-10-1 4:40:52
Hi everyone,I was wondering if there is a design pattern available that can be used to render different types of stuff. My dad is not of one type, it is dynamic, so how can I render it?Thanks
hi, I am a newbie in using struts. I have the following resources.Resources:java:j2sdk1.4.Xstruts:1.2.4webserver:tomcat 5jsp:2.0servlets:2.4IDE:Ecilipse 3.0 IDEProblem: I have copied the struts_blank.war file into tomcat webapps dir. Inside Ecilipse I create a new project and import the ...
4452 byte By
hdevaana at 2007-10-1 4:44:10
Over a year ago, I read some news on OpenGL bindings for Java and I got pretty excited. As I'm interested in 3D programming, it was nice to see that my favorite platform was getting a library it desperately needed. Recently, I've checked on the state of this API and I'm not going to hide the ...
1399 byte By
discorda at 2007-10-1 4:46:58
Write a segment of Java code that takes the value from three double variables d1,d2, and d3, and assigns them to the variables min, mid, and maz so that min <= mid <= max.having trouble with this one spent a very long time on it and then realized that I had to make it <= .public void ...
1523 byte By
jaypeea at 2007-10-1 4:48:18
Hello, I've read that keeping domain model objects in the middle tier (business services, etc.) and using data transfer objects in the business services interface to communicate between the middle tier and the UI tier (controller, view) is a good option if the application needs to support more ...
963 byte By
Ezzebbea at 2007-10-1 4:52:16
Hi, I have a little programming problem with composite pattern:I have classes Mother, Worker and Retired. I this case Human = componentMother = compositeWorker = LeafRetired = LeafSo, I need to do program, which is called "City". First year, there is only one mother. Second year, the programs ...
Hi,I am developing a program in Swing following the MVC (model, view-cntroller) paradigm of Swing and I would like to know if there are any design patterns for the interaction among the varius models of a Swing-based program.For instance, assuming we have three GUI components: a JButton, a ...
Hi folks!I am writing an Application that needs to access the UNIX file /etc/services. I have tought that I need to implement a class named Service and another named EtcServices. My application would then use the Service class to, for example, create a service, and the Service class would use ...
I'm writing a web app using Struts or JSF, and Hibernate / MySQL for persistance. Do you think it's worth it to make Transfer Objects and Business Objects, or just have a model object that has fields / getters / setters / business logic? Either way, there'd be a DAO layer to handle the ...
I know an inner class can access its outer class variables but is the reverse true?i.e can an outer class access its inner class variables?thanx
The team which I am apart of in our little "community" is trying to convince some "others" (management) that we should not use web services to communicate (move large data) within the same application (allbeit a huge application spanning across many servers).Furthermore these "others" are ...
Hi all ,I'm considering to pass a online java certification exam. Most of these exams aren't free of charges...they require payment via credit cards and so...I wonder if there are any online websites that offer FREE Java certification tests ?any links or suggestions would be very ...
Hi all,I have to design an asynchronous application. There are many instances of my application Object which does some work and leaves the control of the Execution Thread waiting for some asynchronous event. One obvious way is to store the state which I was in before leaving the Execution ...
hi! i'm a java newbie and i've been tasked to create this web application. my question is what's good way / strategy to implement data concurrency? for data concurrency, my officemate suggested this design :if user A is editing a record in the table then that record should be locked from ...
800 byte By
dakuraha at 2007-10-1 5:20:43
Hi,I have an abstract class FileComparator which is meant to compare files. It has two concrete classes that extend it; a TextFileComparator and a CSVFileComparator. The FileComparator has an abstract function CompareLine which is implemented by the TextFileComparator and the CSVFileComparator. ...
I am trying to write code that will run with 2 different versions of a Java library. The API is different between those 2 library versions.For example in library v1.1 I have a method: myMethod(String x) {...}And in library v1.2 I have a method: myMethod(String x, String y) {...}In my calling ...
122 byte By
fayea at 2007-10-1 5:31:51
the powerpoint can be viewed synchronously with at least 3 computers. this will be ideal for virtual classroom use.
Hi i am working on project (model-2) in which Generating Different Report is my main Architectureal goalso can any one suggest me any Open source Reporting Framework if any one please help
I am implementing a discrete event simulator for which there is only ever one "executor" object and one "output manager" object used to advance time and deal with output to files. However many objects in the simulator need access to these objects and there "security" is not an issue. I was ...
Hi,I dont really know if this question fits here... anyways, I have an application that has 5 objects. The first objects polls the database for any new transactions. Each message is passed on to another object. If the account in the transaction is not in memory, then the account number is ...
1277 byte By
FourieAa at 2007-10-1 5:51:19
Hi,What is the norm as far as trying to encapsulate state variables in a given class is concerned? If some of my class members are themselves objects, do I create copies of these when returning them to a client (via GETTER methods) and if so, this surely then applies to members of the class ...
HiMy task is to build a fairly intensive maths tool in java and i'm having some trouble in deciding the best architecture to do this in. Basically the user should have a choice of using floats OR doubles (or a mixture) in the algorithms that they run. However, will i have to write two separate ...
4452 byte By
Skitcha at 2007-10-1 5:55:34
I Have a class called syncList that basically has a static List and is also a singleton. I have 2 other classes that use syncList called syncListTest1 and syncListTest2.syncListTest1 puts an entry into the static list and then displays its contents then waits for thirty seconds(just for testing ...
2326 byte By
iamiqrka at 2007-10-1 5:56:34
Howdy,Little background:I have an engine class that requires some sort of persistence. I'd like to make the persistence mechanism "plug-n-play " i.e. transparent to the engine class. I'm working in j2ee. The two mechanisms I'd like to make available are saving into session context or to an ...
699 byte By
at 2007-10-1 5:57:00
i have been working on web project for a while, part of it reads files on another windos box. as i am developing the code on windows also, reading files on another windows box seems to be no problem; however, the production code will be running on a unix box, one of us said reading files on a ...
Hi designers,I don't have much of a book budget so I want to get one that I can actually use. I was thinking about something related to aspectJ. My friends doing their graduate degreees are like.. aspect this, pointcut there, and i'm like.. huh?but what would you recommend? No J2EE books ...
Hello everyone,I am currently working on a project where I have to read data from either a database or a file and depending on how much information is available different statistics will be computed.Currently I have two data types MyRecord and ExtendedMyRecord which are both interfaces and ...
200 byte By
sherina at 2007-10-1 6:07:39
in case of performance critical applications, most of the data should be kept in memory (in my case). how java avail such a facility , compared to Global shared Memory(GSM ) in C++ applications
276 byte By
sherina at 2007-10-1 6:07:40
in case of performance critical applications, most of the data should be kept in memory (in my case). how java avail such a facility , compared to Global shared Memory(GSM ) in C++ applications.please provide the details on this topic with weblinks for reference