abstract classes vs interfaces

164 byte By sundara_va at 2007-9-28 23:26:47
hi all Can any one explain me when to use abstract classes and when to use interfaces. I get confused on thispl helpregardssundar

During server start up

6160 byte By renugavandaloora at 2007-9-28 23:27:25
During J2ee server start up in commandline i am getting NullPointer Exception .i got the the error message like following Can any body let me know why i am getting like this?Exception registering MBeansjava.lang.NullPointerExceptionat ...

StackOverflowError

1198 byte By topicfuna at 2007-9-28 23:28:35
Hi!I have been using J2sdkee 1.3 for more than 1 years and It had worked properly until now.But now I can齮 start the j2ee server because I get the following error:j2ee -verbose J2EE server listen port: 1050Naming service started:1050Binding DataSource, name = jdbc/DB1, url = ...

Can singleton have more than 1 instances?

341 byte By sun4anupa at 2007-9-28 23:29:05
I know a class that implements singleton pattern can not have second instance. True. But I am talking about class with unique "data-instance". I mean a bank can have multiple customers but can't have 2 customer instances with the same accound id. Should I call this "constraints" or ...

Design Patterns: Do you have a good STRATEGY?

496 byte By PaulPhuoca at 2007-9-28 23:33:09
1. Context: Create a XML file. And since thereare many ways: DOM, WAY1, OTHERWAYS, ETC...2. Question: As a Design Patterns application purpose,can we use the Strategy Pattern? Is it appropriate one? If not, what are the alternatives?CLIENT--CREATEXML (CONTEXT)-CREATEXMLSTRATEGY ...

IMPLEMENTING A GAME-ISOLATE BEHAVIOUR

1153 byte By SORAYAa at 2007-9-28 23:33:31
HI!!!!!I HAVE TO DESIGN A SMALL WARGAME AND SOME PARTS ARE ALREADY IMPLEMENTED SO I HAVE TO CONTINUE IT WITHOUT CHANGING THEM.I'VE GOT A HIERARCHY IN WICH THE SUPERCLASS IS ACTION AND THE SUBCLASSES ARE THE DIFFERENTS ACTIONS THAT A PLAYER CAN USE, BUT THE CODE FOR EACH ONE IS NOT THERE AS IT ...

Regarding the Bridge Pattern?

640 byte By vickyka at 2007-9-28 23:35:15
Hi, With reference to the Bridge Pattern I have noticed the following things explained in the "Desing Pattern explained" book: Does there appear to be redundancy? Would you say things have high cohesion or low cohesion? Are things tightly or loosely coupled? Would you want to have to maintain ...

Which pattern is this?

511 byte By Svylbowea at 2007-9-28 23:35:18
Hi,I'm using a User-class to represent online users in a client/server-application. Each user is an instance of the User-class. Reference to individual users can be retrieved by invoking the static getUserByName(String name)-method. It works extremely well, and so I wondered if anyone know if ...

characteristics of a good object

916 byte By laurence10a at 2007-9-28 23:36:44
Hi,I have a question that is somthing like: discuss the ideal characteristics of an object in oo and explain how it is achieved:So far I have what I the characteristics, but I am not so sure about the achievement of them. Could someone help me out a bit, please?1.Provides an abstraction of a ...

J2ME

137 byte By reza5531a at 2007-9-28 23:37:38
I need to start learning J2ME,,but I don't how and where I can find more information of it.I'm completely confused how to start.

Design Patterns: What kind of behavioral patterns to be used?

989 byte By PaulPhuoca at 2007-9-28 23:40:45
Context:A Client can buy 1 to many different kind of CVR.Each VCR can display any type of Video.Question:Please either confirm/correct points 1, 2 and answer points 3,4:1. Creational - Factory (NOT Abstract Factory):CVRFactory (abstract to be implemented) to create a generic VCR (Abstract) ...

Profiling State Pattern

500 byte By fun_rajesha at 2007-9-28 23:44:27
Hi,I have a State pattern implemented as part of a workflow in J2EE. Objects are processed over a series of states in the workflow. The assignment is to refactor the states. To start with and find the bottleneck, we decided to have the system's profile for 1, 10 and 100 objects processing over ...

Need help on a design decision

1350 byte By NyQuesta at 2007-9-28 23:44:48
I've been reading many posts about design decision and when to use abstract vs interfaces and I'm still really unsure which would be the best route to go. BTW, I'm still kinda new to OOD&OOA so go easy on me.The problem that I'm stuck on and can't make a decision on is that I am ...

Which design patterns does the java api use?

321 byte By srhaddena at 2007-9-28 23:51:38
Anyone know where I can find an illustration of the different design patterns used by the java api? Some are pretty obvious, like the "Factory" classes, and am somewhat familiar with the Model-View-Controller pattern used by Swing components, but I'm curious about others I'm not too familiar ...

(really) Transparent Decorator

387 byte By Paracetamola at 2007-9-29 0:01:38
Hi there!I would like to decorate objects completely transparent to the client. Using the GoF-Decorator I have only transparency concerning the methods but not the object identity. So clients must know about the problems using "== comparison".(unfortunately there is no operator overloading in ...

Initializing fields: params or inheritance?

394 byte By valjoka at 2007-9-29 0:03:08
I need to two objects behave slightly in different ways. That is, they have several (about 6) different fields (variables and events). I can initialize the fields by- passing values to constructor and setting the fields in constructor;- set the fields after construction;- declare getXXXField() ...

Design Pattern for Caching data ?

148 byte By Ash_java1a at 2007-9-29 0:06:27
Hi,Can anyone suggest or point me to appropriate design pattern which will tackles caching data problem domain.ThanksAsh

Multi Member Team Java Application Development

1159 byte By amdawonga at 2007-9-29 0:13:03
HI guys,I have a situation here and I hope some of you can shed some light on what we can do.We are a team of 3 students working on a java application. We will be developing our application using on an exisiting java applicaiton developed by our seniors. During our process of development, we ...

Design Pattern for not implementing all the methods in the interface

549 byte By gary-tama at 2007-9-29 0:25:21
Hi,I have the following classess and interface.public Inteface A {public void method1();public void method2();}public Class B implements A {public void method1() {}// no body contentpublic void method2() {}// no body content}public Class C extends Class B {public void method1() {// do something ...

UML

160 byte By heretic_guya at 2007-9-29 0:25:45
er. im supposed to develop a software explainin uml. whats it. cant seem to find anything relevant using google. anyone care to explain or show sum links

Design Patterns: Singleton. Are 2 Implementations equivalent?

1684 byte By PaulPhuoca at 2007-9-29 0:25:47
Hi All,Are Singletons of point 1 and of point 2 equivalent?1.public class Singleton{ private static Singleton instance = new Singleton(); private Singleton() { } public static Singleton getInstance() {return instance; } public void do() { }}Singleton.getInstance().do();2.public class Singleton{ ...

ResultSet problem with a jdbc connection pool implementation

891 byte By afontana1a at 2007-9-29 0:26:33
HiI'm trying to use jdbc connection pool in my java application (js2e 1.4.0_01)from the example at http://www.developer.com/tech/article.php/626141In my main() code, in addition to JDBCConnection, JDBCConnectionImpl and JDBCPool classes, i use..JDBCConnection conn;conn = new ...

Data Access Objects and associations....

762 byte By markeyMarka at 2007-9-29 0:27:04
Ive got a few classes which are 'value based', and represent some configuration for some dynamic part of my application.I was going to employ the Data Access Objects pattern ( http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html) to decouple the data source (either ...

error in app.tld using struts frame work

6554 byte By manojmenonka at 2007-9-29 0:28:59
Hi,i am a bigener in struts.I am using JBoss as application server.when i am running my struts example i am getting this error 17:37:10,487 INFO [Engine] WebappLoader[/SimpleStruts]: Deploy JAR /WEB-INF/lib/struts.jar to ...

Am I using the MVC pattern?

708 byte By mpernambucoa at 2007-9-29 0:29:26
I have a very simple database CRUD application written using swing.This application has a class called DatabaseServices that is used to query and update the database. DatabaseServices is independent and self contained, it does not make any reference to the other UI classes in the application. ...

Which pattern I must use for a j2ee app?

292 byte By m_scandoloa at 2007-9-29 0:38:23
Hi,I would like to development a j2ee aplication (web-tier and ejb-tier with database access) following a web application framework; but I don't know which I should use. What about the WAF framework of the Pet Store example?.Any help would be appreciated. Thanks.

Abstract Factory Pattern

1614 byte By dubwaia at 2007-9-29 0:40:57
Anyone who has been working with XML in Java or any tool that uses XML in Java for any amount of time must have noticed that they have accumulated a fair amount of implementations of SAXParser, for example.Now this is a little annoying. I do a search on xerces on my machine and I find 30 jar ...

Automagic UML Diagram Generation

133 byte By SacredGeometrya at 2007-9-29 0:55:26
Is there a product/tool out there that can generate UML from the code. I've seen UML code generators, but I want the reverse.

URGENT: how to integrate Log4J into application efficiently

192 byte By LightWinda at 2007-9-29 1:08:15
Hello experienced developer,Pls give some advise on how to integrate the Jakarta Log4J into application, like book store web application.Which design pattern should i use?

problems to deploy the Converter application (j2ee examples)

1911 byte By gionnyDeepa at 2007-9-29 1:11:34
I try to deploy the Converter application (j2ee examples) but when I try to deploy (after the verifier without faults) I got this error grabbed by the error.log:java.rmi.MarshalException: CORBA COMM_FAILURE 1398079689 No; nested exception is:org.omg.CORBA.COMM_FAILURE: minor code: 1398079689 ...

OMG's Model Driven Architecture

332 byte By amraam10a at 2007-9-29 1:13:35
There's a description about very interesting project, where ArcStyler and Rational Rose played the main role: http://www.theserverside.com/resources/article.jsp?l=BausparenOnlineHas anyone else any similar links? Experiencies or links about projects that are related to OMG's Model Driven ...

Communication within mvc triad

1551 byte By VoLaTiLea at 2007-9-29 1:14:00
HiI'm currently writing a desktop application using the hmvc pattern and I'm having a bit of a problem with updating the model from the view since I don't want to use accessor methods ("Service in mind", objects should take care of their on updates......).In the application I have to take ...

Factory Pattern

248 byte By boinapallia at 2007-9-29 1:20:30
How a factory pattern is helpful?coz for that we have to maintain one extra class and If there are more classes we need to maintain them in xml file is this is not a overhead?only for decoupling(not hotcoding) we have to go for this pattern?

I've got error when I try to start J2EE 1.3.1 server

1703 byte By gionnyDeepa at 2007-9-29 1:22:42
I typed j2ee -verbose and that's what I've got...Starting JMS service...Initialization complete - waiting for client requestsBinding: < JMS Destination : jms/Queue , javax.jms.Queue >Binding: < JMS Destination : jms/Topic , javax.jms.Topic >Binding: < JMS Cnx Factory : ...

Typesafe Enum decoding

843 byte By PyrosXa at 2007-9-29 1:28:33
Ive implemented the typesafe enum pattern, for use in communication packet headers (three implementations, packet Type, packet Opcode, and ErrorCode).The instances classes of these need to be convertable to and from an int value. I achieved this with a "toInt()" function returning the value ...

Where can download a good tutorial of OOP ?

86 byte By jpadrona at 2007-9-29 1:38:24
I need a simple tutorial or reference guide, where can find one ?.thanks

The most popular J2EE Container?

47 byte By danialaghaa at 2007-9-29 1:39:28
What is the most popular J2EE Container?

Is this a good design?

969 byte By lifeisbeautifula at 2007-9-29 1:50:12
I am designing an online application. There is a super class DataItem and 3 subclasses. Also, each of the classes has a dao class with the same inheritance relationship. In each sub DAO class (extends DataItemDAO), it has its own getContentItems() method which calls getItems() method in ...

Why WEB services?

5217 byte By valjoka at 2007-9-29 1:54:34
Hello, I'm starting learning Struts. I have some experience creating WEB sites basing on 3-tier architecture. Until recently, I considered database and web server components as a high level objects that need some talioration to achieve the goal of building a web site. Yes, I always looked for ...

Petstore not working in J2EE1.4.1 beta2(with sunone application server)

17211 byte By seshuna at 2007-9-29 1:56:13
Hi,I have downloaded an installed J2EE1.4_beta2 , which has J2EE SDK, JRE , Sunone application server, and J2ee blueprints sample apps. I have installed properly as per the installation instruction. I am able to run Quickstart application. But when I try to run petstore the following error ...

why struts used Command Pattern?(can not understand)

108 byte By davidweng1977a at 2007-9-29 2:03:59
I can not understand Commnad Pattern, Can anyone explain it with struts?thanks sincere!

Object Diagrams

287 byte By johnnyc313a at 2007-9-29 2:08:20
I don't know an awful lot about UML but Ive to do a "Detailed Object Model" I've done class diagrams, collaboration diagrams, Activity Diagrams, and state diagrams, but I cant find anything about a detailed object model.Any help?Thanks in advance...Johnny C

EJB LIKE A TRIGGER

1375 byte By jose.nyimi@proximus.neta at 2007-9-29 2:09:02
Hello, I' moving my code from Perl to Java/J2EE. The goal is to integrate 2 systems, to be short the business is mainly to transfert any update, insert, delete from sytemA to systemB. Those 2 sytems use Oracle database. The requirement doesn't allow me to create any trigger on Oracle ...

Why this object can invoke this method?

1439 byte By Yashnooa at 2007-9-29 2:11:45
There is an question puzzled me all the time.There is a example:The "HelloHome" is a interface extends javax.ejb.EJBHome and this interface has a method "public Hello create()...". The Hello is another interface extends javax.ejb.EJBObject and has a method "public String getHello()...".The ...

paging pattern in J2EE

332 byte By ratan_nka at 2007-9-29 2:14:05
I want to search in database and display the record in page(jsps). Suppose if I got 100 records in search but I want it to display 20 records in a page, so for 100 records I want it to display in 5 pages. Is it possible to display like that without using a statefull session bean? If possible ...

Pattern for managing an object's state

255 byte By iamajavausera at 2007-9-29 2:20:39
Suppose an object's state has been changing. I want to keep track of the change of the object's state, so that I can provide services like, restore the object's state to any previous one.Is there any pattern for solving this problem efficiently?

How to get a reference to myself in ejbPostCreateXXX()

956 byte By cvandycka at 2007-9-29 2:25:19
I have an entity bean (2.0) that has a two way relationship to itself.It implements two methods:get[/set]WorkingCopy()get[/set]ProductionCopy()I have defined a method in this bean:public MyEntity ejbCreateWorkingCopy(MyEntity sourceEntity);andpublic void ejbPostCreateWorkingCopy(MyEntity ...

Delegatable pattern

548 byte By jonbarrila at 2007-9-29 2:27:14
I created an interface called Delegatable, which has one method "Object getDelegator()". The purpose of the interface is to allow the delegate to navigate back to its delegator. The specific application was to allow relational delegates, such as generic tree nodes, to get to the real object of ...

Problem about the PortableRemoteObject method

721 byte By Yashnooa at 2007-9-29 2:27:27
In test method of EJB and I find the code:"InitialContext ctx=new InitialContext();Object objRef = ctx.lookup("java:comp/env/ejb/Hello");HelloHomehome=(HelloHome)javax.rmi.PortableRemoteObject.narrow(objRef,HelloHome.class);"The jdk help file says:"The narrow method takes an object reference or ...

modeling a webapplication

241 byte By shakuttana at 2007-9-29 2:32:25
i am developing a web application using servlet,jsp,beans(MVC architecture).can i use uml for analysis and design.i have to prepare the documentation of my project.i would like to follow the OOAD.can you please help me in this regard.