Bhupinder Dhillon

Ranch Hand
+ Follow
since Oct 12, 2000
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Bhupinder Dhillon

Originally posted by prabhu kasi:


The println method automatically adds the new line character - so you don't need to add it manually. As for the text being rendered on one line - I suspect your server is running on unix where it adds the EOF as \n and you're trying to open it in MS Windows (Notepad etc). Notepad and some other windows based editors don't recognize the \n character as EOF. I suggest you try this editor, it recognizes both EOF characters.
[ August 22, 2003: Message edited by: Bhupinder Dhillon ]
14 years ago
I hope someone has used this pool manager before and can help me. I'm trying to create a GenericPool for XADataSource but it's throwing NullPointerException at pool.start(). Here's what I've got so far:

It's supposed to work like this:
Create XADataSource
Create StandardXAPoolDataSource and pass the XADataSource to it
Create a GenericPool and pass the StandardXAPoolDataSource to constructor
Start the pool
That's all there should be but I can't figure out where I'm going wrong. Here's the API docs for the pool XAPool 1.3
Sun One Web Server (formerly iPlanet), but not very
but then again I don't have a say in this
14 years ago
Why does the following code produces different output on solaris with time zone set to 'TZ=Canada/Mountain':
When run in JDK 1.2.2
Date: Wed, 09 Jul 2003 13:06:44 GMT-06:00
and in 1.3.1_02
Date: Wed, 09 Jul 2003 12:06:25 MDT
Here's the code:

[ July 09, 2003: Message edited by: Bhupinder Dhillon ]
14 years ago
I think these links will help...
Composite Entity Pattern
DAO Pattern
Here's the brief proccess:
If an object can not exist without another one - then use Composite Entity. In other words, Your topmost DAO object will use other DAOs for dependent objects. In this case I'm guessing that the topmost DAO will open the connection and pass it along to the dependent objects for transaction control.
But then again if an object can be used as a dependent object and as a topmost (self suffcient) object, then what do you do? Safest thing to do would be to remove connection stuff from the DAO and put it in business object for transaction control.
I would assume that a RanchVO would have a Collection of MooseVOs, but is that assumption correct?
I think so.
If so then retrieving a Ranch from the DAO would pass a VO along with its collection of MooseVOs, right?
That depends entirely on business requirements. I recently worked on a Mammography DB app where a patient has 1 or more lesions and each lesion has 1 or more biopsies done on it. Througout the app I never had to load all records for a patient. In all the cases, a user would only be working either on a patient object, a specific lesion for a patient object or a specific biopsy. So there really was never a need to load all lesions and their biopsies. However, I did put a method in patient DAO which optionally loads all the lesions and their biopsies.
In addition to the RanchDAO, would there be a MooseDAO?
Absolutely. Suppose you want to remove the Moose from the ranch and put it in a truck (on it's way to slaughterhouse or to be released back into wild), how would you save the Moose's state since it's not in the Ranch anymore?
If this is the case, since transaction control is handled in the DAO, would the RanchDAO interact with the MooseDAO. The business object interacting with the two DAOs, particularly when saving the state of the Ranch would include saving the state of all associated Mooses, would seem to put transaction control in the business object rather than the DAO.
From what I learned - DAO is only supposed to know how to save/update/retrieve/delete a particular object. So transaction control would automatically be the responsibility of business object since you might want to update multiple objects in one transcation.
I hope this helps you get back on the tracks.

Originally posted by Rufus BugleWeed:
needs to be dealt with just the same as Hussein and Bin Laden.

If someone hasn't already told you, here it is: you're really losing it.
14 years ago

Originally posted by Maulin Vasavada:
we don't have a command line switch/option for the browser exe (not for IE nor for NN) that says "open window without locationbar or menubar" you know. that is the problem.

Netscape has command line options for that. The only problem is - it only works if netscape hasn't already started yet.
14 years ago
I see they have made it transient because it's useless writing out empty elements in the object[], but I wonder why they simply didn't call trimToSize() before serializing it? That way the object[] wouldn't have needed to be transient.
14 years ago

Originally posted by Jim Yingst:
All the standard implementations of collections implement Serializable - ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap, and asssorted others.

But if you look at the "Serialized Form" of any of these classes in javadoc, you'll see that none of them serialize the data elements. Most of them only serialize the size of the collection - which is pretty much useless without the data elements.
[ March 04, 2003: Message edited by: Bhupinder Dhillon ]
14 years ago
I've never worked on Swing but my impression is that's what JavaBeans were originally designed for visual beans! All these companies which make GUI development tools do use them heavily.
14 years ago
Perhaps Vectors are being used because their data elements can be serialized - hence useful when you are creating a visual java bean.
Just a thought...
[ March 04, 2003: Message edited by: Bhupinder Dhillon ]
14 years ago