mat buckland

Greenhorn
+ Follow
since Sep 01, 2009
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 mat buckland

I have a properties file located in the root of the war file.

How do I read in that properties file when the servet is deployed?

thanks
14 years ago
what database connection pool implementation would you recomend?

Better to make the clients wait (sleep, actually) in the app server until they can get a connection.



Does the app server take care of that or is there something I must do to achieve this?

cheers
1 access per user per 30 secs.

thanks

PS. Just curious -- why do you not recommend more than 50?
My client isn't very clear on the amount of expected traffic.

At the upper end though I imagine it'll be maybe 100-200 concurrent users calling a web method that reuires DB access every 30 seconds or so.

If you think that this number warrants a pool, what sort of pool size would you recommend?

thanks for your advice
I am creating a RESTful service that reads and writes to a MySQL DB.

Is it better to create a new connection to the db each time a query or update is required or to manage a pool of db connections that are always 'alive', which are served out as and when needed.

thanks for any advice.
Hi,

I'm curious to know why my flaoting point calculations in Java give incorrect results. For example, doing this:


gives the result:

0.1
0.2
0.30000000000000004
0.4
0.5
0.6
0.7
0.7999999999999999
0.8999999999999999
0.9999999999999999

Would someone be kind enough to explain what's going on here and what i can do to correct it?

Many thanks
14 years ago
Instead of the web service creating one automagically when it's deployed?

I would like the WAR file to contain a wsdl file I can view and edit. is that possible?

thanks
14 years ago
I've created a webservice, which I'm trying to access using an Actionscript 3.0 client.

Unfortunately the client cannot parse the wsdl since it trips up on the import here:

<xsd:schema>
<xsd:import namespace="http://test.co.uk/" schemaLocation="http://localhost:9875/TestServer?xsd=1"/>
</xsd:schema>

However the AS3 client can access the Amzon SOAP service fine, which I've noticed does not do the import.

Thanks for any help
14 years ago
tis ok, i've found the answer!
I have a Container of objects in my server, which regularly need writing to the database. At the moment I simply iterate through the container and do an executeUpdate() for each object.

This is slow though. Is there a way I can create an update that will send all the objects to the database in one cumulative update instead of many?

thanks
I have a 'timestamp' field in a mysql table.

when I attempt to insert a Date into the table. Like this:


I get the error: Data truncation: Incorrect datetime value: 'Thu Oct 01 11:08:57 BST 2009'

I've tried changing the timestamp field to DATETIME, TIMESTAMP and DATE but to no avail.

What am I doing wrong?

thanks
I'm creating a web service that will be deployed in Glassfish or Jetty. I'd like to clarify how the threading works.

Do web containers like Jetty automatically create a new thread per connection, which then executes the webmethod or do i have to manage the threading myself?
14 years ago