Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Biswajit Paria

Ranch Hand
+ Follow
since Feb 02, 2003
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 Biswajit Paria

More information:
I am using weblogic v7.0 and applications are deployed in admin server only.
14 years ago
System.out.println("about to leave loop() - " + name);} public static void main(String[] args) { TwoThread tt = new TwoThread(); tt.setName("my worker thread"); tt.start(); try { System.out.println("another thread calling......"); Thread.sleep(700); } catch ( InterruptedException x ) { } Thread t = Thread.currentThread(); String name = t.getName(); System.out.println("Test name="+ name); tt.loop(); }}

Here tt.start() will create a new Thread and will execute loop() separately.

While Simply calling tt.loop() will be excecuted in main Thread.
[ July 17, 2007: Message edited by: Jim Yingst ]
Hi All,
I am using weblogic JDBCConnectionPoolRuntimeMBean ( to get detail status regarding JDBC connection while running an application on Weblogic.


Then I used

Using that above code, I get total number of try that connection pool tries to reconenct database but failed(at the time while database was not available or there is any network problem between application and database.)

Problem, I am facing:
Though the above code works fine, but after database is up and Network problem resolved, I still find the same count for connBean.getFailuresToReconnectCount(), it is not reset

I want, after database and network issues resolved, this count should be reset to Zero.

I tried to use reset() method, but it does not work.

Please advice.

Thanks in advance.

14 years ago

I am trying to compile my classes in JDK1.4 version and few classes depends on other classes which are complied in JDK1.5 version .

I am getting the following error:

bad class file: /home/w3eqadm/emtclients/companypage/build/script/emtclients/companypage/lib/emt.jar(com/csfb/equity/edge/util/ApplicationProperties.class)
class file has wrong version 49.0, should be 48.0

I am in a situation that, I have to compile classes in JDK1.4 which are depending on classes complied in JDK1.5.

How can it be possible? Please advice.

14 years ago

I was expecting error as my Cat object created at line 4 is not serialized but when i replace line 4 with
Animal a=new Animal() which is superclass of Cat i am getting error

if your Cat class is not Serializable, you will obviously get exception....

The following senario where you would not get any exception:

1.If your Super class Animal implements Serializable interface then Cat class will not throw exception even it may not implement Serializable.

2.Your Super class does not implement Serializable and subclass Cat implements Serializable...then your above code will not throw exception...

Is there any way in which I can run a class without the main method?

NO. JVM requires main() method to run a class. In other way you can do,if you have a class called Test class having main method, then you can create a thread object of the class that you want to run not having main() method...then call start() and it's run method will be executed..(provided your class should implement Runnable interface).
14 years ago

<note date="23/09/07">

in the above note element I've date as an attribute.
But date can also be defined as a child element like <to>and <from> of note

What difference does it make having date declared as a child element or as an attribute of note element.

Then date would be an attribute for note and would be child for notes
It can be possible if you define your DTD/Schema accordingly...

This is just my hello world program.. I thought i can just place it in webapp->class.. Is it compulsory to make it placed inside a package???

be sure that you have servlet class file(make a jar file) in lib folder in WEB-INF ..
14 years ago

Can an interface be declared as abstract??

Interface is always abstract...
any method you declare there in have to implement or make your class abstract... can make as...
public abstract interface <interface_name>...
14 years ago


Class CardBoard{
Short story=5;
CardBoard go(CardBoard cd){
return cd;}
public static void min(String ags[]){
CardBoard c1= new CardBoard();
CardBoard c2=new CardBoard():
CardBoard c3= c1.go(c2);

There would be only one object for Garbage collection.
While you pass c2(copy of reference)in method go() and made it null, still it's original object's reference is maintained by c2,see before line CardBoard c3= c1.go(c2);

and finally you made c1 as null so Object referred by c1 becomes eligible for garbage collection....

package pack1;public class TestSupSub{public static void main(String []args){SuperClass s= new SubClass();s.disp();}};

Hmmmm...I got your point...
ok..In your Test class while you are calling s.disp();, it means...your compiler is dreaming that you are calling SuperClass's method (it is called runtime polymorphism), So it does not warn you...but actually at runtime you will get subclass's method call...

Now if you do like new SubClass().disp() your compiler will warn you that it is not visible to it. as you know that protected method it not visible to other classes unless extended....
14 years ago
What about parameter?
Could anyone please look into it?

15 years ago
Hi All,

The following jdk parameter will expire the IP cache in JDK 1.4.

Could you please let me know,whether this option will work in JDK 1.3 too.
or there are any other option in JDK 1.3 to expire IP cache?

Biswajit Paria
15 years ago
In more Specific, Why out of 'ss' in test()method is different for two cases?
15 years ago
Hi All,

Here is the following program, I got strange output for instance variable for the following program.

abstract class A{
public A(){
public abstract void init();

public class Test extends A{

//get output for two cases, Why it is different?
//public String ss = "blank";//First Case
public String ss ;//Second case

public void init(){
System.out.println("init-ss-1: "+ss);
ss ="init";
System.out.println("init-ss-2: "+ss);

public void test(){


public static void main(String[] args) {
new Test().test();

Could you please explain, why the output is different in two cases?

15 years ago