This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!

Sripathi Krishnamurthy

Ranch Hand
+ Follow
since Mar 07, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 Sripathi Krishnamurthy

I noticed a strange implementation in Spring 2.5.6 JDBC jar..



The underlying table has a column called TRANSACTION_FLAG which is varchar(1). So it takes only 1 char of data. But as you can see from the above code, transaction flag is a boolean.
But surprisingly, the above code worked perfectly fine in Spring 2.5.6. When run, it used to insert 0 or 1, based on the flag. How did this happen? How did Spring 2.5.6 automatically convert a boolean to 0 or 1? Did it read the column metadata and convert a boolean to fit in the column size? What if I needed a Y or N instead of 0 or 1?

When I upgraded to Spring 3.1.0 JDBC jar, the same logic failed. It gives the error column data too long for the column. I think this error is correct. Spring should not automatically convert anything from boolean to whatever it likes by reading column metadata.

Was it a bug in spring 2.5.6 JDBC which was fixed in 3.1.0 JDBC?

Please let me know your comments/suggestions.
9 years ago
The basic idea is not to press the chapati dough very hard. If you press it very hard while flattening it, it will become papad. Do not use all your strength to make it flat before putting it on tawa.
10 years ago
My suggestion is whomever is sending the XML, they should fix it and send the proper XML for processing. You should not be worrying about fixing the XML, but rather worry about the XML and its contents and how to use it for further processing.
And for the part where XML is not correct, you can try this one. http://www.quickfixengine.org/xml.html ( I have not used this, but worth trying)

Jesper de Jong wrote:WebSphere is IBM's Java EE application server implementation. Yes, there are many people, and many companies, who use this.

However, WebSphere is not one of the "leading edge" Java EE application servers. It's always at least one version of the Java EE standard behind other app servers. If I'd want to learn Java EE, I'd start with Glassfish, which is Oracle's open source reference implementation for Java EE. It implements the latest standard and works really well. When you use the NetBeans IDE, you can get Glassfish with it set up and ready to go.



I believe that Websphere is indeed the leading edge technology. I mean look at the products they have. Websphere Application server, Websphere portal server, Websphere process server, Websphere MQ, Websphere Datapower and much more. I would accept if one says, Websphere is not the "easy to use" application servers and one can go for other app servers to learn the basics first. Websphere provides flexible integration across different products and security and different features which are worth the investment for large firms having long term benefits in mind.
10 years ago
There are different things you should consider.
1) check whether there are any concurrent applications running i.e. Database server, MQ server, any other application consuming memory and CPU.
2) Since you say that your application is showing outofmemory, you will need to revisit your application API and check the object creation and scope properly. You can use any profiling tool such as Jprobe from quest software Or optimizeIt software. I have personally used JProbe and it gives an excellent insight on the CPU, memory and object state.
3) Perform performance and load testing on the application. Using automated testing software, load test the application to find out at what stage the application shows outofmemory. You should be able to pinpoint the functionality which is having bottleneck.
10 years ago
So Agilian is an IDE that can be used for adopting Agile methodologies in an application, right? Looks like a powerful tool to me. I have started using one similar (but different) tool in my company. Is this a client-server based toolset?
I am a software engineer and I am okay
I play with designs and architecture all day
I create master software designs in everyway

People say, "Software engineers are in total dismay"
They also say this day for software engineer is a doomsday
It is our carefully chosen destiny is all I say

We are the ones who get a very high pay
When the sun shines, we do make our hay
When total economy is failing, we really don�t have our say

This is the ideal time to go for a long holiday
Forget all the pains and sorrows from office and getaway
And when we come back to office, let�s hope everything is just OK

For all those there, be patient and wait for another good day
Then we forget what happened yesterday, and rejoice Hip Hip Hurray!
Time will come when we can dance and sing again..Yay Yay Yay!

I am a software engineer and I am ok, till TODAY!
12 years ago

Originally posted by Sagar Rohankar:


When we read the column, the pointer advance to the next column and if there are no more rows to read for that column , exception is thrown !



I am afraid thats not the case here. Please look into the code. I am using the method resultSet.getClob(10). So it always tries to fetch from 10th column. The pointer doesnt move to next column automatically.
Can someone please explain what is the root cause of the below problem?



From the link Retrieving from resultset, I got the below info..

Using the getXXX Methods

The ResultSet interface declares getter methods (getBoolean, getLong, and so on) for retrieving column values from the current row. Your application can retrieve values using either the index number of the column or the name of the column. The column index is usually more efficient. Columns are numbered from 1. For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.

So, Is my code failing because I ma using getXXX method more than once for the same column? I know for a fact that using getXXX method on the same column multiple times doesnt solve any purpose since it can cause performance issues. But leaving performance aside, the piece of code which is not working should be working fine isnt it?
You can make the question number and the userid as a composite primary key in the database table. Before inserting the data into the table, check whether a row already exists in the table. If it already exists, do not allow another insert, rather allow an update.
13 years ago
JSP

Originally posted by Steve Luke:
When you iterate over a map you are iterating over the entry set, not the map directly. This means that each value returned by the outer loop is a MapEntry, not an ArrayList. The MapEntry would have a method getValue() which would return the ArrayList to use for the inner loop. Example:



Thank you very much. It is working fine now.
Regards
13 years ago
JSP

Originally posted by seetharaman venkatasamy:
hai
culprit:
request.setAttribute("param",map);

change your name from param to param1 or something else..because param is one of the implicit object in EL...more over for:Each items should be collection or array

Hope THis Helps



The one I have given above is just an example. I havent used param as I have given there. The variable names that I am using in my application is entirely different. For this example, you can assume it as "param1" as you have indicated.
Thanks
13 years ago
JSP
Hi,
I have this problem..

In a JAVA class I have the below code


In a JSP, I have written a JSTL which is written this way,


So basically what I have is, a Hashmap which has String as a key and an ArrayList object as a value.
When I try to run this, I get the error cannot run forEach for "items".
What part of code am I not writing correctly? Please help.
13 years ago
JSP

Originally posted by Ilja Preuss:
Take a look at http://ant.apache.org/manual/OptionalTasks/echoproperties.html



I got the solution for my problem.
<property name="devinfofile" location="dev.info"/>
<propertyfile file="${devinfofile}" comment="dev Information">
<entry key="devDB" value="shellDB" />
<entry key="devUsr" value="shellUse" />
</propertyfile>

Then use,
<replace file="/build/dev.properties"
replacefilterfile="${devinfofile}" />

The replace file option will take the key value pairs defined in devinfofile and replace all instances of the /build/dev.properties file.
13 years ago

Originally posted by Jeanne Boyarsky:
Sripathi,
It sounds like you want to a replace on properties. Where do the new values come from? Another file, hard coded, etc?

The answer to this question would determine the approach so you'll get a more useful reply after elaborating.



Hello Jeanne,
I have set the values to be replaced in the property variables in ANT.

<project name="productionBuild" default="help" basedir=".">
<!-- set global properties for this build -->
<property name="letter" value="P"/>
<property name="PROD_DB_NAME" value="shellDB"/>
<property name="PROD_DB_USER" value="shellUsr" />

I just want to use these values and replace them with the values in the properties file.

Thank You
13 years ago