Matthew Shapiro

Greenhorn
+ Follow
since Jul 04, 2007
Merit badge: grant badges
For More
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 Matthew Shapiro

setting acquireRetryAttempts in the c3p0 properties for hibernate.xfg.xml seemed to get rid of this problem for me.

been trying things the last hour, then as soon as i post this i fugure it out lol

hope this helps anybody else.....
Hi,

I have a server running Hibernate, using C3P0 as a connection pool. When I start up my application, if the MySQL server is down when i start the application using

new Configuration().configure().buildSessionFactory();

I get the following error

Caused by: java.net.ConnectException: Connection refused: connect

but this seems to be getting caught and printed by C3P0 or Hibernate itself and not let me catch it. Is there any way, such as a setting in hibernate.cfg.xml to allow me to catchi this myself. I have put a try catch around buildSessionfactory() but nothing ever propogates up to this method call.

Thanks in advance
Ben
I am writing a servlet that accepts a soap message from an iPad/Android device of an order, and converts it to an order.

Where I am having a problem is that I am wanting to then send the order (text formatted from soap message) to a network printer somewhere else via IP Address.

Is this possible?
12 years ago
Thanks for the info guys, you've given me a lot to think about and investigate over the next few days. Seemed like such a simple example... guess this is one of those oh so common can of worms java has so much of ;-)
Hi,

I am wanting to learn a little more about threads, and have been looking at examples of Visibility. The following code is said to either produce 42 or 0. But I don't see how it is to produce 0 as the number is set before the ready boolean so surely the thread will keep looping till the second variable is set. can someone explain for me, thanks


Thanks for your replies guys...

unfortunately i am not able to use vm arguments. So have come up with a way to keep the properties on a server file which the user can update which will in turn change the language to japanese. A bit of a hack, but no other way i have found works.

Ben
16 years ago
Hi,

I can run my code in a japanese language by providing the following VM argument.

-Duser.language=ja

But how do i set my machine up to do this instead of having to provide a vm argument?

I have tried in regional and language options in the control panel of xp but the language is only set if i set the locale to japan.

any ideas? Thanks in advance

Ben
16 years ago