I am working on my firts Struts application and am having difficulty with int and boolean types. I've been told that I should be using Integer and Boolean types in my beans' getters and setters...I'm trying to populate both an int(Integer) and boolean(Boolean) from values returned in a ...
334 byte By
k5_Coola at 2007-9-28 20:56:06
Dear All,I have some question about Java as OO - programming language especially in UML. I've try to do code generation. I found out the tool support method 'finalizer'(consider as special method for destruction of class). Can anyone tell me whether there is any finalizer method ...
I checked dozens of internet pages but didn't find an answer on that question.
Hi!In AbstractFactory pattern all products in client class are create by abstract classes (AbstractFactory or Abstract product) e.g.public class Client { AbstractFactory factory = null; public Client(AbstractFactory factory) { this.factory = factory; Window window = ...
Good day to all of you!Any one know where can i get the free resources related to buidling web application with UML? like ebook, article, web site?Pls let me know.
I'm new to patterns and have stumbled upon an issue where I have functions that operate on objects inside the passed Collection. The problem is that I need to know the type of the objects inside the Collection inorder to invoke a method on it. Yes, I can assume that the Collection passed ...
I don't understand how to use Law of Demeter (LoD) with hierarchical classes and the Visitor Pattern.The hierarchy of classes is for example (with relationships): Article [m:m] Supplier [m:1] Address.If I want to set the address, I would normally have to code something like: ...
735 byte By
heero82a at 2007-9-28 21:16:24
Hello.Now i want to produce a web site which uses the java to develop.My web-server is using the resin and apache. But now i got one problem. This problem is that which pattern i should follow.Because now i heard some of the pattern in here,struts and core j2ee pattern, these two patterns have ...
Hi all,I had been working on J2EE technologies for the past 3.5 years, but I switched to Oracle DBA some 8months back on my friends suggestion. I am doing well in this new job, got appreciation from my manager also. But now I dont feel like working as DBA, want go back to development. Does the ...
Hi!I'm developing a web application, where I want to cache some Java objects in a HashMap. The Objects will then be fetched using something like this:Cache.getPost(String key);But I'm not sure if I can use a static method and a static HashMap for this? Is a Singleton more suited? If so, ...
I don't know how to find solution for this. I am trying to run the code library com.exellar.* which I copied from my office machine to home machine. Same code I have managed to compile on my home machine. In my office I am using Tomcat 4.0 and at home Tomcat 4.1.24. But when I have to run the ...
I know jave sufficient, but I am not familiar with the pattern names.Could some body please list of all paterns and their defination (How It makes that pattern). If you point the pattern in the examples(java source code or example source code) it will be great.Is there a link that I can check ...
518 byte By
wfchka at 2007-9-28 21:31:58
Dear all,I am new to MVC development and have a client want to use J2EE MVC architecture to develop a portal.The client suggest to put the servlet, JSP pages, images and EJB all on the application server and the web serever will only act as a HTTP proxy. They have firewall in front of the web ...
390 byte By
arya_18a at 2007-9-28 21:33:56
Hi All, I have requirement like this:I connect a USB Mass storage device (that has audio contents on it) to my PC and do a synchronization of the contents on either side. Basically copy what is there on PC to device and what is on Device to PC. Also resolve file name conflicts encountered by ...
Hi, this question may require Experienced System architect or project leader to help me.Currently i am working as a normal programmer. I hope i can be System Architect in future (probably for J2EE platform). So, beside my system design skill, do i need DB design skill as well?If DB skill is ...
Hi all,I am writing struts and EJB using Sun one App and Studio. I have written a order cmp and a ordermanager session bean. I can add and get the records but can't update the records. It throw an exception like this:Some remote or transactional roll back exception occurred ...
2104 byte By
fwefersa at 2007-9-28 21:43:59
Hello,I am developing a (XML-)DOM-based database class, storing specific information in trees and providing some public methods modify all database content (add, remove, etc.) All these methods work with path parameter of the type String, to access objects in the DB.Now I've decided to ...
Hi everybodyI am using this class : public class Singleton{ private static Singleton instance = null; public static Singleton getInstance(){if(instance == null)instance = new Singleton();return instance; } private Singleton(){} public static void test(){Singleton s = ...
Hello,I'm trying to familiarise myself with the new Java features that project Tiger (Java 1.5) will introduce. I come from a C++ programming background. I very briefly studied enums whilst I learned C++ and never used them in my programs, so I was, quite frankly, relieved when I learned that ...
Hi,I have a Rational Rose model where I have a sequence diagram whichshows the objects (with their classes). It also shows the messagesbetween the objects as method calls (i.e. the names are like sendNotification(), updateView() etc). How can Rational Rose convert this sequence diagram to a ...
Can anyone reccomend a good book which covers GUI design patterns in Java?I guess Im looking for something like the 'J2EE Core Patterns' book, but for (non-web based) GUIs.Im familiar with MVC and have used swing quite a bit - and Amazon only seems to turn up books about the swing components ...
Let me just ask this to see if I have this right:The Template pattern is really just a fancy way to describe inheritance where some processing exists in the base class that depends on the implementation of other methods in the subclasses. That's what it seems like, at least.And the Active ...
Hi, I am getting following error while starting WebLogic Server 7.0 for the first time. Can anybody help me in this? Error is: =======================================================================Enter username to boot WebLogic server:system Enter password to boot WebLogic server: Starting ...
Hi,My application is EJB centric and I have to support two different types of views. 1. Browser based for the extranet users.2. SWING based view for intranet users.What's the best way to design my front controller? Is it advisable to use a single controller for both types of clients? Is there ...
I have a table and have several programs to maintain this table.When I add a column to the table because business change,I have to modify every program relating with the table.Could you tell me what pattern can separate the change of table from program?Thanks!!
692 byte By
KALKALa at 2007-9-28 22:14:34
Hi.This is my question.When I build a WEB applications, which is only running on WEB-tier,I use a Struts framework.This is the best way for me when an application is only running on WEB-tier.However, when I want to build a multi-tier application, which implements business logics on EJB-tier and ...
7724 byte By
hongZa at 2007-9-28 22:18:15
Hi,I am reading through the petstore source code.I cannot figure out how the first screen (main screen)initialized.When MainServlet is called,it suppose call init method in MainServlet,so i assume the main screen should be initialized in init method.But I didn't find where is it.Can someone ...
152 byte By
gm_mia at 2007-9-28 22:22:08
Hi everybody!I'm little confused abt the difference b/w abstract class and interface. Plz help me in this regard.ByeMustafa
Can you please help me a little bit with LoD?I don't understand how to use Law of Demeter with hierarchical classes and the Visitor Pattern.The hierarchy of classes is for example (with relationships): Subsidiary [1:m] Article [1:m] Variant [1:m] Week.To access the price one would have to ...
in pattern Transfer Object Assembler, TransferObjectAssembler (usually a stateless session bean) produces a snapshot of the model at the time of construction and collects the data to a access object, my question is how can it be sure that the models in different business object may not change ...
thanks.
293 byte By
stfndlna at 2007-9-28 22:38:46
Hi,I have an MVC structure for my web-application. Now I need to integrate database transactions into my javabeans.I use a database pool manager for this. How can I create one instance of the database pool manager so it is known in my web-application (beans)?Thanks
549 byte By
fkkonga at 2007-9-28 22:40:34
Hi,I have an online shopping application that allow user to search product from the catalogue. Currently, I am using struts as the framework and there are DAOs as the persistence layer.Is there any search/filter pattern that are suitable for seaching from web-tier to DAO layer.Here are 2 ...
Hi!I have been suffering to reach Oracle from J2ee for weeks and I can't solve the problem. Please Help Me!!!I have read a lot of topic concerning this error but I wasn't able to find the solution anywhere.I use J2EE 1.3 and Oracle 8i. I have already made the necessary settings:j2eeadmin ...
Right am i correct here:UML is the notation used and the Unified Process is the development lifecycle/process.How many versions of the unified process is there or is Rationals unified process the only one?Cheers
1734 byte By
fedetxfa at 2007-9-28 22:44:14
I want to avoid reading twice an image using a FilterInputStream.The problem:I have to read the image as a stream to calculate it's MessageDigest. I have then to re read it to generate the BufferedImage.The first test I did I used to read it twice using mark and reset in the InputStream.Now ...
1295 byte By
hongZa at 2007-9-28 22:45:52
Hi,I have a problem to run my jsp page.The project was running properly in other machine using the same server(oc4j server).when i run the test jsp page,i got following error message:500 Internal Server ErrorOracleJSP: oracle.jsp.parse.JspParseException: Line # 6, <jsp:useBean ...
553 byte By
svareta at 2007-9-28 22:47:46
I am using a tool to generate a JDBC tier that applies the DAO design pattern. However, the generated code is based on "autocommit"-strategy, i.e. there is no conn.setautocommit(false)-statement in the code.I have added statement so that I can handle the transaction by myself. The ...
Hello allI am currently developing an event management assignment for my degree.A subset of problem statmentAttendee is a person, who would register with the application in order to view the posted events.For this part of the problem statment i have identified a usecase"register attendee". I ...
I have to implement a service which gets its data on the server using a DAO object.I intend to implement my DAO as a singleton. However, I was told that it could become a "performance bottleneck".Can someone tell me more about that?Thanx,Stephane
I have a class which currently has only static methods; no initialisation of the class is needed for it to be used.The (static) methods of this class are used constantly.Would it be better (in terms of performance, etc.) to use the singleton pattern for this class - i.e. to have one held ...
Hello All,I need to implement the scheduler in Java, Here is my requirementWe need to run the particular events in scheduled intervals like weekly, monthly,Daily etc.we have the time stored in database, we need to compare the current time with the time stored in database and run the event.I ...
3108 byte By
vickyka at 2007-9-28 23:03:05
Hi, I would like to get some feed back from you all regarding my definition of the Abstract Factory Pattern and the Factory pattern,All I have developed just by keep in mind the basic definitions. Following is the code./** DEFINITION : The Abstract Factory Pattern is used to return one of ...
Hi, recently I have discussion with management people about the software development process.The management peoples always emphasize on product, which state that code to create the product, then overlook the design aspect of the system. And they have the arguments that the generic design always ...
Hi,I have a business requirement wherein several classes implement an interface, only each concrete class needs to have only a single instance.I have a wrapper singleton factory, which decides what singleton reference to return. However, is there any way of enforcing the creation policy on ...
641 byte By
mpmanoja at 2007-9-28 23:16:00
Hi all!I hope it's not an out of topic here. I need a firm answer.Is there a need to learn complex, restricted, unnecessarily complicated, too specific, error prone, headache prone, difficult to maintain, time consuming and always upgrading EJBs? I haven't used them before and don't feel ...
241 byte By
erlloyda at 2007-9-28 23:16:53
I'm new at web servers, and have a basic question. I have both j2ee server and Microsoft iis installed on my computer. Will one override the other or is there a way to change which server is hosting my web site? Thanks for the help.
654 byte By
mash909a at 2007-9-28 23:22:54
HelloI wonder if anyone could suggest a suitable pattern to apply to the following simple scenario:I would like to have a system whereby clients are able to obtain two versions of the same object. One which is read-only, and one which is read-write. If someone obtains a RW object, then they ...
HiI've been reading up on MVC and the 3-tier architecture. I'm pretty confused as to how MVC relates to the top two tiers: Presentation, and Domain/Business Logic.Using the JTree-based application as an example, I have:1. an Application that listens to the JTree and manipulate the File System ...
Just want to know any suggestion or is there any problem in the following class:public class VoltageLevel implements Serializable {public final int HIGH;public final int MED;public final int LOW;public VoltageLevel(int high, int med, int low) {HIGH = high;MED = med;LOW = low;}}The client will ...