Help coderanch get a
new server
by contributing to the fundraiser

Aniket Kedari

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

Recent posts by Aniket Kedari

Hi all,
I want to use Java Transaction service for distributed transaction management in my Java application.

I have 3 different databases to which I have to connect using 3 different Connection objects. I want to insert certain data in each of the 3 databases.
My requirement is that atomicity should be maintained. So either data should get inserted in all 3 databases or it should not get inserted in any of the databases.
I searched on net for this kind of transactions and I got http://java.sun.com/javaee/technologies/jts/index.jsp .
I could find its API here http://java.sun.com/products/jts/javadoc/index.html
But I am still not getting how implement transactions using it. Can somebody provide me with links to sample code or tutorials of Java Transaction Service.


Thanks in Advance,
Aniket Kedari
Hi all,
Can anybody provide links to tutorials, examples explaining how to use Java Transaction Service (JTS)?
Actually I want to do distributed transactions across multiple databases in core Java. I am not using any framework or EJB etc.

Thanks
Aniketto
Can I use Java open Transaction Manager JOTM for this?
If yes can somebody point out to any tutorial
I tried to use aucommit(false) and then commit on individual connection if no error occurs.
But if there is an error during commit() of second connection, I wont be able to rollback changes done by commit of first database connection.
So is there a better way of doing this?
Hi all,
I am developing an application in which I am using three different databases.(say db1, db2, db3).
Now I insert certain data in each of the databases. But if this insertion fails in any of the databases,
I have to rollback all transactions and terminate process.

Can anybody suggest how this can be achieved.

Thanks in advance,
Aniket
Hi all
I am using
eclipse Europa 3.3.2.
subversion 1.5
and subclipse (which I installed using help->software updates-> find and install in eclipse)
Now in subversion repositiry view when I right click and add new repository location after clicking finish button eclipse gets closed.
Can anybody tell me why this is happening and how to overcome this.

Thanks in advance for your help.

Aniket.
Hi all
I am in search of a file indexing library. Basically I want to develop a utility like google search. Particulary in case of images Google searches the image by context. In my applicatoin I have to search words in TIFF files. Is there any library other than lucene available. I am already trying lucene. Also I have seen many web sites which use google search facility for their own search. How can I use it for my application.

Thanks in advance,
Aniketto
Hi all,
I want to know is it possible to run a servlet application if I put in a directory other than Tomcats webapps directory.
For example if I created an application on D drive and I want to run it how can I do this?
16 years ago
Hi all,
I am developing an application which will draw graph for conference hall booking. It will be simillar to a gantt chart with little variance.

The image will look like this

Please tell me which API will be convenient to use. Specially I want to draw fragmented lines( to show hall was booked between 1 pm to 2 pm and 3 pm to 4 pm).
Can it be done using gantt chart or timeseries chart in JFreeChart.
Hi all
I am developing an application which displays map using google MAP API.
I am displaying images and labels on the map using LabeledMarker.
Now when number of images are plenty ( say 200 or more) I get a warning message. It says something like "The javascript in this page will make Internet Explorer slow. It may also hang up the machine. Do you want to execute javascript"

Can anybody tell me solution to this problem
hi all
I am developing an application which needs to access images files put in image folder in java bean file.
I tried a lot by using different methods and failed always, except in case of absolute path which I dont want to use.

My directory structure is as below

/Web-apps
/MyApp
index.html
myjsp.jsp
/Images
img1.png
/WEB-INF
/classes
/beans
GraphBean.java

In GraphBean.java I have the code


I want to use img1.png file in place of image file name.
I want to know how this can be achieved without using absolute path.

Thanks in advance
Aniket
16 years ago
JSP
The problem was either browser or proxy server was caching the page.
Even meta tags didnt work so I changed jsp to add a parameter to the image url that is unique so that it thinks it is a different image
Made it

code]<img src="<%=tempHamiGraph%>?r=<%=System.currentTimeMillis()%>" border=0 usemap="#imageMap">[[/code]
16 years ago
JSP
Amit,
I create graph in a function in bean. This function saves graph in a session variable. It also returns path of a servlet. In JSP I use the servlet path returned by the function in img tag to display graph. In servlet I retrieve the graph stored in session variable which is ultimately displayed in jsp.
16 years ago
JSP
Amit thanks but your suggestion doesnt work.
I think I am doing a mistake when I save graph in session variable.
session.setAttribute("tempHamiGraph", tempHamiGraph);
I need new graph to be created for each request, but as I am saving it in session I get the same old one. I tried to use
request.setAttribute("tempHamiGraph", tempHamiGraph);
but it didnt work.
16 years ago
JSP