Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Ajit Kumar

Ranch Hand
+ Follow
since Jan 27, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ajit Kumar

Let us say that a servlet stores a java bean such as 'product' in the session.
If an application client (not web client) is accessing this servlet over http,
will the app client be able to access the java bean from inside the session.
Does it mean.... in this type of scenario, it is advisable to go for BMP instead of having three CMPs??
Let us say that i have a customer object.
Address is part of that object.
A customer can have multiple credit cards.
With CMP, i believe, i can have the address as a serializable object and have it as part of the customer EJB.
How do i deal with the Collection of Credit card objects that are related to this customer.
Is it possible with EJB1.1
Is BMP the only way to deal with it?
hi Guys,
It looks like the idea of having both the customer and the address as CMP entity beans does not seem to be a good idea, as it varies with app servers. I am using EJB1.1.

Is it a good idea to go with Bean Managed Persistence, with a DAO doing the data access part.
[ February 07, 2002: Message edited by: Ajit Kumar ]
hi all,
I have a customer EJB object.
It has a dependent object Address.
Customer EJB is a CMP Entity bean.
How can i establish the relationship between
Customer and Address Beans.
Can the address also be a CMP Entity bean?
Does it have to be a Java Bean.
If it were to be a java bean, how can i ensure the persistence of its fields.
I am using EJB1.1 not 2.0
I d appreciate your comments.
hi Kodo,
You did mention that you followed the design of the pet store. Did you implement that frontController pattern the way it is done in the PetStore with the Main Servlet acting as the Controller??
you said that the author has confirmed the deletion.
Did he post a message here?
hi Guys,
Has Sun taken any action on posting the assignment solution on the web.
Did you guys try to communicate with him and explain why he should nt do, what he is doing. This is not cool for the solutions to be in open like this. Pretty much we all have been to this stage after our SCJP, SCJD, SCEA part 1 exams. We need to continue to communicate with Sun and/or to the person who has put it on the net till he removes it.
hi All,
I have two classes.
Class one
Class two is a Utility class. It has different utility
methods placed in it.
IF i have to show the relationship between these two
classes in a class diagram, how should i depict it.
a) Should i use a solid line showing navigability from
DBManager class to the Utility class
b) Should i used a dotted line from DBManager to the
Util class showing that the DBManager classes
Instantiates/Depends on the class
I am using CMP for EJB beans in my project. I would like to get the sum of a particular column in my EJB.
how do i do that.
It cannot be in the entity bean i guess.
My reasoning is based on the fact that each entity bean instance corresponds to a row in the database table.
Hence a method like getSumOfxxx() cannot be part of the behaviour of one particular row.
Should i have to use JDBC from a session EJB?

any ideas?
thanks in advance
Which statement is true?
A. Classes loaded into a browser from the local network are trusted
B. classes loaded into a browser from remote sources are trusted if they are signed
C. classed loaded into a browser from remote sources are trusted if they are in a signed jar file
D. classes loaded from a jar file on a remote source can sometimes be trusted even if the jarfile is unsigned.
E. classes loaded from a signed jarfile are trusted if the public key associated with the jarfile's signature is marked as trusted in the keystore.
The answer is given as D.
Is it correct.
I think the correct answer is E.
What do you guys think

The answers to the question
two features of HTTPS
are given as
- It is secure
- It is connection-based.
is the second option correct?
any comments
Let us say that i have a utility class.
Where does it fit in the MVC framework.
Can i see it as part of Model?
When a stateful session bean is in the passive state and it times out, if a client makes a reference to it.
Does the container try to restore the stateful sesion bean from the stored session data or does it throw an rmi.NoSuchObject exception???
Please comment.
Where does a utility class fit into the MVC Model .
Can i view it as Controller?
For example: I am using a class with get/set methods for its attributes. This class is used as a parameter to some methods. Instead of sending all variables as different parameters to the method, i am storing all variables inside this object and send the object as a parameter.
Can i say that this class acts like a Controller. It does not actually do the controller task( as per the definition atleast ). Or should it be seen as model.
I'd appreciate any comments