hi all Can any one explain me when to use abstract classes and when to use interfaces. I get confused on thispl helpregardssundar
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 ...
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 = ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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) ...
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 ...
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 ...
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 ...
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 ...
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() ...
Hi,Can anyone suggest or point me to appropriate design pattern which will tackles caching data problem domain.ThanksAsh
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 ...
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 ...
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
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{ ...
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 ...
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 ...
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 ...
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. ...
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.
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 ...
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.
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?
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 ...
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 ...
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 ...
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 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 : ...
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 ...
86 byte By
jpadrona at 2007-9-29 1:38:24
I need a simple tutorial or reference guide, where can find one ?.thanks
What is the most popular J2EE Container?
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 ...
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 ...
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 ...
I can not understand Commnad Pattern, Can anyone explain it with struts?thanks sincere!
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
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 ...
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 ...
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 ...
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?
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 ...
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 ...
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 ...
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.