Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Dhamodharan Krishnan

Greenhorn
+ Follow
since Nov 07, 2001
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 Dhamodharan Krishnan

You can take the preparedStatement's update Count to see how many records have been successfully updated.
But then, the statement in each batch should update one row in the table, then only it will make sense, to see the number of rows updated and come to conclusion based on that.
Hi ,

I am doing a select and then update on the resultset.
But I am getting the following exception.



Steps followed

getConnection();
create PrepareStatement.
Set teh values for querying.
executeQuery and get ResultSet

Update teh values in teh ResultSet.

Call updateRow of the ResultSet.


But this says virtual column not allowed here.

I have no clue. I am badly dependent on select and update.

Thanks in advance for your help.

Dhamo.
Hi,
I have got the following exception.
The number of parameters in the inclause of this statement exceeds 1000. Is that the reason for getting this exception.

Please let me know what can be done.

Thanks a lot for your quick reply.
I will take care of that as you said.
I understood it better now.
Dhamo.
15 years ago
Hi,
I am somewhat new to struts. Please let me know whether the following way of accessing the Objects are fine with.
I have an TestAction.
In the that, I call the TestBusiness
public TestAction()
{
public void execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
TestForm formObj = (TestForm)form;
TestBusiness testBusi = new TestBusiness(formObj);
// Store the ref of form in the Business itself.

testBusi.setFirstSetOfValues();

With the help of the form values that obtained I make somethign on the Action and then
testBusi.setSecondSetOfValues();

All these method calls to the business will set some values in the form.
And inturn they are also making use of some values in teh form.

i.e. Instead of sending those values one by one from the Action to the business, I have taken the form to teh Businesss.

Is this OK to take the ref of Form in the Business class and directly get or set the values from that .

Please let me know whether this way of designing is a good practise or not.
Thanks a lot.

}
}
15 years ago
I am getting No Collection.
15 years ago
<logic:iterate id="return_asd" name="SomeForm" property="otherButtons" scope="request" type="com.tt.ButtonBean">

While trying to convert the above statement in my jsp, it is reporting as Code too large for try statement

If anyone know the answer, please let me know.
Dhamo.
15 years ago
Hi friends,
I do use an object which consists of lot of strings.
When I do a transfer the fields from Java object to C string,
I do the following
1. Get the string object from the Java Object.
2. So I get a jstring.
3. Now I do GetStringUTFChars to get a char*
4. Then I do a ReleaseStringUTFChars soon after getting the string.
<Error: After release, the character array consists of junk not the string sent from Java>
5. Still it will take some time for me to use the C character array.
6. Whether I get a reference of the string in the Java object in the jstring i.e. obtained as a result of GetObjectField.
7. Whether I get a reference of the jstring in the Java object into the character array.
Please help me to find out.
I do get the error in Windows as well as Alpha Systems.
When I do transfer some 5 or 10 objects like this, it works fine.
But when I do transfer 510 to 10000 objects like this, I land up in loosing the data. Our application requires transfer of such huge amount of data
Thanks in advance.
Dhamo.
17 years ago
Hi Thomas,
17 years ago
Thanks Don,
Let me try to free the memory allocated in C and try it out.
Thanks for the valuable links.
I think we can make a search in sun site too.
Dhamo.
17 years ago
Hi Khurram,
Hope you know Cricket.
try
{
code and its Exection // bowler and batsman
}
catch( Exception1 ) // fielder1
{

}
catch( Exception2 ) // fielder2
{
}
...
finally
{
// Umpire
}
Bowler bowls - Programmer does the code
Batsman bats - Your computer executes
Fielders - Your catch blocks
Umpire - What he decides is finally.

If it is thrown again in any of the catch block,
Then only Third umpire should catch it
Dhamo.
17 years ago
Hi Zhang,
I am sorry to say that you cannot always put the jar files into jre/ext directory.
Its better to know how to set the classpath.
Because while building an application for a purpose and when we create a bat file to make it run, we need to clearly set the classpath that too relative classpath and make the application run.
It should be something like when the user runs the batch file, he should see beautiful beautiful applets frames demon processes should run.
And its easy to track what all jars your program requires.
If you start putting the jar files in the jre/ext directory, then at one point of time, the performance will drastically become slow and hence it is better to avoid.
I think Lily has raised this question because she needs to have only one jar as her whole set of deployment.
That is the recommended way of deploying version in companies.
Not to bore you.
I will just give you one example of how it is useful in one of our application.
We have one serialized file in addition to the jar that we give to the client.
The client application is just a hand held device. iPAQ.
That will support only one jar .
In the ser file we write the initial version.
Whenever he loads the application, it communicates with our server and tries to know whether the jar consists of the latest version .
If not we recommend the user to download the latest.
As he clicks the download button, the latest jar will be downloaded and next time he starts his application he gets the latest.
So many such things to speak about.
Sorry If I had diverted the original question of lily.
17 years ago
Hi,
I need to do garbage collection in JNI. Please clarify me the following points.
I assume these concepts are correct upto the knowledge that I had gained from the books that I read.
I am going to implement in our project all these concepts. So, I thought of getting opinion from you people.
Please criticize.
I do C to Java communication ( With C creating the JVM and executes Java methods )
Point No:1
-----------
I do know that global reference will keep the object from being garbage collected across many JNI calls. i.e. JVM wont gc this object unless we explicitly delete the global reference.
Please validate this.
Point No:2
-----------
An object is created as a local reference.
Do I need delete it in order to allow gcollector to swallow this object.
Point No:3
----------
During core dump, can I give the function call to do safe shutdown, in order to avoid dangerous loss of data. i.e. like closing certain
Connection.
Point No:4
-----------
The methodIDs, fieldIDs are not changed on a particular machine unless I do change anything in the Java side.
Point No:5
-----------
Any string obtained using GetStringUTFChars() has to be followed by ReleaseStringUTF().
Please add any more points.
My C program is going to run like a Demon.
Can I use threading in Java.
Or it is better to implement threads in C?
Please suggest any online material for JNI that can be downloadable.

Dhamo
dhamo_dharan@indiainfo.com
17 years ago
Hi J[J]n Khan,
Let me try to help you if you give some code snippet.
Or even if you could slightly explain in what way you do try to access the native code.
Your starting point is from VC++ or Java.
17 years ago