Ritesh Agrawal

Ranch Hand
+ Follow
since Jan 08, 2004
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 Ritesh Agrawal

Hi folks,

Looks like the above code works fine when the log level for the hibernate package is set to DEBUG. When I set it to INFO, it doesnt work. Its a weird issue and I have no clue why this is working this way. I would be thankful, if someone can provide some insight into this.

Thanks for the responses.

Well, I tried to resolve the issue in a differnt way using Transactional Annotations. Below is the complete source code along with the application context. I have posted the same quesstion on Spring Forum at

Based on your explanation of not being in a single transaction, I had changed the code and put calls to two add methods in one method and made that method Transactional.

Please note that the posted JUnit Test case works fine and the first call to smartBaseBO.add is rolled back when the second call throws exception, but the same code is unable to roll back when used in an application. Thanks for helping me out with this.

Application Environment:

Spring 2.5.6
Hibernate 3.3.1 GA
Oracle 10g
tomcat 6.0.18

Did you ever get a response to this question? I am facing the same issue.

Please refer to the following URL.


I tried your code and although it seems correct and same as the sample provided in the Java 6 API Docs, you need to wait for the Printing Job to be completed before closing the InputStream.

I added the code provided in the above URL, but it still didn't work for me. Thus, I added a Thread.sleep(20000); //sleep for 20 seconds to allow for Job to be completed, and then close the input stream.

Try this, hopefully it will work for you.
13 years ago

I am getting the following error while trying to open a Java file in Eclipse 3.4 Ganymede.

I tried restarting eclipse with -clean option also. Even then the problem persists.

Here is the complete stack trace

Any help would be appreciated.

Thanks Jim. I got what I was looking for at the links provided by you.

Thanks again..
13 years ago
Well, I am refering to default JVM settings like the default minimum Heap Size/ default maximum heap size etc. allocated when the JVM is started.

java.lang.System getProperties() doesn't give the heap size.

I am interested to find out the default JVM parameters/settings used by an Java application when it is invoked by the java command. I understand that the default JVM settings can be overridden by providing command line options likes -Xms -Xmx etc. I am looking for a command line utility (if any) or any other means to find out the default values if no overriding options are provided.

13 years ago

Does JAVA provide any command line utility to find out the default JVM settings for an installation. If yes, what is it? If no, is there any other way to find out the default JVM settings?

13 years ago
Thanks. We are using log4j because on stress testing our application, we found that System.out.println is about the same as using log4j in async mode.

Appreicate your time and effort.

Can you please direct me to some article which discusses the performance comparison between using System.out.println and using log4j to write log outputs.

Position: Senior Java Developer
Location: Matawan, NJ-07747, USA
Work Experience: 5+ years
Project Duration: Full Time
Job Posting Date: 27-NOV-2007

1. We will not sponsor any new H1B.
2. Recruiters and Consulting Companies, please excuse.

Skills Requirement:
Languages: Java, JSP, Servlets, SQL,
Technology: Spring, Hibernate,
Application Servers: Tomcat 5x or WebLogic or WebSphere
RDBMS: Oracle or DB2 or SQL Server etc.
SCM Tools: CVS or Subversion or any other SCM tool
Web Development Skills: AJAX, JavaScript, HTML, XML

Interested candidates may send their resumes to my email ID.

[ November 27, 2007: Message edited by: Ritesh Agrawal ]
14 years ago

I heard of this term from one of my colleagues. I have seen job postings which require this technology.

I would really appreciate if someone can tell me what exactly is Java AWD. Is it some Java API, or methodology or a software etc. A google search doesn't reeal much.

Thanks in advance for your help.
14 years ago

In the following code:

the com.acme.foo:com.acme.bar is the name of the Class package. This class package contains the classes generated by the JAXB compiler to handle the objects created during marshalling/unmarshalling.

I guess you are not supposed to generate the jaxb.properties file. If you are seeing a error which says "jaxb.properties file not found", then probably your jaxb related JAR files are not in the system classpath or the application server classpath. I would recommend copy the JAR files to the lib folder of the application server and then restart the application server and try executing your code.

Let me know if it works for you.


Use this link to get the information you need. https://www.suntrainingcatalogue.com/eduserv/client/welcome.do?l=en_IN

I see that Sun doesn't have a office in Hyderabad. However, it has offices at Bangalore, Mumbai and Delhi. The link provides Toll Free numbers to Sun offices. You can call them and have your queries answered. Also, I believe you can buy the Vouchers online here https://www.suntrainingcatalogue.com/eduserv/client/loadCourse.do?coCourseCode=CX-310-081.
Hi Santosh,

First of all make sure the link works. Please do not post broken links.

SCWCD requires you to be an SCJP first. And if you are an SCJP, then it is assumed that you know how to compile Java code. If you want to learn Java, then its better you start at the Java Beginners Forum and read some Java books first.

Based on assumption that, you want to create a build.bat file for using Ant, it would be good to download Ant and read the Ant manuals. Get a feel of the available Ant tasks and their functionality. Afterwards, this particular article might be useful to learn using Ant tasks http://www.informit.com/articles/article.asp?p=30183&seqNum=2&rl=1

I am not the one to teach you how to make use of an Forum, but certainly I have experienced that people don't like to spoon feed and don't usually help unless you have put some efforts first and done some homework by yourself.