Win a copy of Spark in Action this week in the Open Source Projects forum!

chandra mohan

Greenhorn
+ Follow
since May 05, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by chandra mohan

Hi,
Yesterday I cleared SCJP 6 with 81%. When I tried to register in Sun certifications database ? It is giving error like user not exist could any of you had faced this problem? what to do ?

Thanks in Advance.
11 years ago
Hi,
I had just tried the below code but it gives compilation error.Could any one of you please explain me why?

I am declaring the exception which is defined in the super class.Why it is giving error in class T3 ? It is also subclass of T1 correct ?
11 years ago
Hi,
Bitwise & Bitshift operators are there for 1.6 ?
Hi,
I had a swing based application.User will login to the application ,claim some tasks and start work on those.If he closes the window all the tasks he claimed will be released and logged out of the application.So that others can work on that tasks.

If the user closes the window by ctrl+ALt+Del i.e. by end task the tasks he claimed is not getting released.Now I have to release the tasks even he closes the window by end task .Any of you please tell me how can I do that?
Basically I need to know how to capture the endtask event?
[ June 27, 2008: Message edited by: chandra mohan ]
12 years ago
Hi,
I am not that much familiar with hibernate.I had a Adversion table. In adversion mapping file I had specified lazy ="false" for 6 properties.
I am trying to retrive the Adversion object using primary key.



It is loading all the child objects.
I just want to load only one of the child object out of 6 eventhough lazy property is set in hbm file.

How to do this ?
It is straight forward.

After the while loop you are setting y = x where the value of x is 4 at that time. Later you changed the value of x to 27 but not �Y� so it printed value of y as 4.
12 years ago
Actually We are doing testing of our application using load runner tool.we placed that tool in between client and server.all the server request will come to the tool. Problem is it is coming as serialized java object like //x01 //x45...... how to intrepret the object as in this case I can't use input stream . I need to see the values returned from the server.
12 years ago
I have content of the Serialized Object like //x01//x09......

Is there any ways to intrepret these values into readable format.

Thanks in Advance
12 years ago
then how you are going to store the names ? are you going to use arrays ?
12 years ago
Andrey,
Change validate method like this

add message in your properties file and use that key for creating action message

I hope this solves your problem
[ May 10, 2008: Message edited by: chandra mohan ]
12 years ago
Thanks guys,
I got it now.
Thanks Jeanne,

I got your point about precomiplation but I have one more doubt. You said in my second example the query is different.I am just changing the value not the query so how it would be different ?
I think by default it will give only "" for string .

You said you are getting null value for other fields what's the data type for those fields?
12 years ago
Why should you need a null to be returned ?
What ever the condition you are checking you can check for "" instead of null.
12 years ago

Originally posted by Scott Selikoff:
From the PreparedStatement API: "A SQL statement is precompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times."

The alternative is a Statement in which data is not known about the query until it is executed. The common example is if you need to do 100 inserts. With a PreparedStatement you can use the same statement 100 times, just changing some of the input values inbetween update calls. With a regular statement, this is compiled at runtime and cannot be changed.



Scott,
Lets have a small pseudo code of what you said
(If we are going to insert 100 records means usually we will use the loop)

String var = "a";
String query="Insert...";

for()
{
........
preparedstatement.setString(1,var);
executeInsert
}

In the above pseudo code instead of prepared statement if I am using statement then also I can change the value at runtime like this correct ?

String var = "a";
String query="Insert..." + var;

for()
{
........
var = ...
executestatement
}


So I can assign values at runtime in both the statements then what Pre compile exactly means ?

I thought that It is for performance improvement.