Atul Prabhu

Ranch Hand
+ Follow
since Dec 17, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Atul Prabhu

Hi,

Variable "k" is once again declared in class B. By doing this you would be hiding the variable "k" present in super class A.

The reason you are getting zero, is because that value refers to variable "k" present in class A ,as showij() method is present in class A.

However in class B showK() method prints 10, because the variable "k" present in class A is hidden, as class B variable "k" overides it.

Modify the showK() method, you will get the exact picture.


Regards
Atul
17 years ago
Hibernate Shards is the way to go...

Its a sub project of Hibernate, through which you can access multiple datasources.

Have a look at this link..

Hibernate Shards Doc

Regards
Atul
i = x++ + x++;

i = 1 + 2 = 3 and x = 3.

Before evaluating the second x++ the value of x is 2, hence it takes the value 2 and not 1.

i = 1 + (2++)

Regards
Atul
Hi,

Calling methods on NumberFormat.*** dont need synchronisation as those methods dont share your resources.

Could you be more specific ?

Regards
Atul
Hi,

I have never tried it. But you can definitly try

Runtime rt = System.getRuntime();
rt.exec("java MainClass"); // MainClass which loads the GUI


Regards
Atul
19 years ago
Hi,

Its not disappearing.
I guess Classpath is not set(CATALINA_HOME , JAVA_HOME) . Read the installation that comes with Tomcat.
If you want to know the exact error open your command prompt and run the startup batch file from command prompt.

Regards
Atul
19 years ago
Hi,

You could refer to this site. Hibernate
Hi,

You could start of with the database design first. If you are using Hibernate each of your table would map to a class.

Hibernate can also be used in desktop stand alone apps. Hibernate apis are quite sufficient, you need not use any plugins for that purpose.

Regards
Atul
Thanks Ernest Friedman-Hill

Now the things are clear.
[ February 01, 2005: Message edited by: Atul Prabhu ]
Hi,

Thanks Ernest Friedman-Hill.

If one wants that the current thread to sleep() what should be done without acquiring the lock on the shared object ?

would a call to function which just iterates the "for" loop be sufficient ?
i.e for(int i =0 ; i <1000; i++) {}

or is there anything else which I am not aware of.

Regards
Atul
Hi,



In this case if I create two instances of ThreadTest and call the method start().

The output of this code was :


My question is if the first thread calls goToWait() method then it goes to wait state i.e call to wait method does not return.

As the method is synchronised it allows only one thread to call goToWait() method. So concept wise when the first thread is in the wait mode at(// 1) then it should not allow any other thread to enter goToWait() method.

But in this case we see both the threads are in wait state. I think only one thread should be in wait state.

Could any one explain why such behaviour.

Regards
Atul
Hi,



I create two thread instances of ThreadTest and call the start method of the thread.

In this case whether the Thread.sleep() is synchronised or not ?
Does the user has to handle the synchronised part ?

Regards
Atul
Hi,

System.out.println(--i);

You are using a prefix operator over here. Prefix operator first executes the statement i=i-1 internally and then prints it. So i = 11-1 = 10

Regards
Atul
Hi,

need to know whether a particluar class ex: Person is present in the ear file or not ?

Actually Person class is present in a jar file within the ear file.

I tried to use java.util.jar package which has a class called JarFile which gives me the list
like this
META-INF/
META-INF/MANIFEST.MF
lib/
lib/cglib-2.0-rc2.jar
META-INF/application.xml
META-INF/sun-j2ee-ri.xml
abc.jar

Actually the Person class is present in abc.jar. The problem is how do I come to know whether Person class exists in abc.jar..

Any suggestions ??( I have to do this programatically not through command prompt)

Regards
Atul
19 years ago
Hi all,

I am entirely new to web service. So please correct me if I am wrong somewhere.

I have read the basics of web services i.e WSDL,SOAP,UDDI.

I have also gone through the JWSDP package.

1. Is a web service, application server or web server dependent ?

2. What are these tools like Axis, Systinet ? Are they third party tools to be used along with web server/application server ?

3. Where does JWSDP fit ? Can we use the JWSDP package to deploy a web service independent w.r.t server (web/app)? In which scenarios we should use JWSDP package ?

I am pretty confused
Reg



---

A T U L
19 years ago