According to JAVA documentation, Connection#commit() can throw SQLException. My question is whether or not a rollback should still be issued in this scenario.
For example:
Connection con = null;
try {
// assume this method returns an opened connection with setAutoCommit(false)
con = createConnection();
// do DB stuff
...
Let's say I have a common method which creates a DB connection:
Connection getConnection() throws SQLException {
Connection con = ... // create the connection
con.setAutoCommit(false);
return con;
}
I put the setAutoCommit(false) call here so that callers of this method never have to worry about setting it. However, is thi...
I'm using Eclipse to develop a java web app and My IT department called and said I had over 75 open oracle connections to the development Oracle Server originating from my PC. The deployed app has been using the same singleton connection bean for a year now and I haven't had any trouble with exceeding connections there. IT even connfir...
Hi all,
i got a Linux Kernel from http://www.at91.com/linux4sam/bin/view/Linux4SAM/LinuxKernel running on my ARM board.
I have a connection through serial port to my host system windows,
i also got a SAM-ICE JTAG debugger device.
so how can i send some data from my windows to my embedded linux?
...
Whats the best practice for scalable servers which need to maintain a list of active users?
Should I open a persistent TCP Connection for each client on which the server sends update messages?
This could lead in many open connection and propably no traffic for many seconds. Is this a problem in TCP?
Or would it be better to let the Cli...
We have WCF services that operate over multiple protocols for different customers. Most work fine, but when we use SSL the connections take a long time to close. Opening a connection is no problem, but closing is very slow.
The strangest behavior is that the close time is proportional to the amount of data that was transmitted on the co...
Hi all,
I tried to use several transactions in Doctrine (v1.2.2).
Here my test:
// Open a new database connection
$cnx1 = Doctrine_Manager::connection('mydsn'); // $cnx1 will be named '0'
// Open a second database connection
$cnx2 = Doctrine_Manager::connection('mydsn'); // $cnx2 will be named '1'
// Start a transaction on connection...
I was under the impression that not calling Response.Flush would ensure that Connection: Close would not be returned. So how do I return Connection: Keep-Alive?
I am using the following code to return a file from ASP.NET.
Response.ContentType = type;
Response.AppendHeader("Content-Length", bytes.Length.ToString());
Response.Cache.SetCa...
Is there a way to have a live connection (like for a chat server) with a server using only HTML(5)/JavaScript?
...
I am doing comet long polling to retrieve notifications from the server. There is significant delay when requesting new pages quickly. The long poll request is held for 60 seconds. I'm pretty confident cause is that IE7 is waiting for these requests to complete. The delay is gone if I up the MaxConnectionsPerServer value in the regis...
Hi,
I'm using GWT RPC to connect to server side. On server side I've to connect to MySQL database, from which I get data I need. My question is which is best practice when I want to test my application, because I haven't deployed it yet on Tomcat app server, and it seems I cant test it, if it is not deployed. When I test it in developme...
I thought I had this all figured out, but now that I'm writing a webserver, something is not quite working right.
The app listens on a port for incoming requests, and when it receives one, it reads everything up to the sequence "\r\n\r\n". (Because that signifies the end of the headers - yes, I am ignoring possible POST data.)
Now, aft...
hi all.
i have some questions about databases and remote connections..
i've made an application that connects to sql server db on local machine then i published the app. and installed it on other machine..
was very bad when i realised that the application won't work except that there are sql server instance on that machine.. :/
am th...
Hey I'm relatively new to Android programming (but not programming in general).
The Setup:
HTC Wildfire (running Android 2.1)
LM058 (RS232 Serial Cable Replacement)
LM058 will later on be attached to a MCU but for now it's connected to my laptop (terminal)
The Goal:
To connect Wildfire to LM058 to each other with a 'bidirectional-strea...
I have some legacy JDBC code that is used within an EJB, in this code a call to setAutocommit() is made (which is not allowed for managed transactions, for understandable reasons).
I would like to skip this method call if the code is used within a managed transaction, but let the call remain if used in an un-managed context.
Is there a...
Today I've installed the SQL Server 2008 Management Studio Express. As I know, on the start up there is a login screen where I can choose betweeen the authentication and credentials. Now I have startet SSMSE and I cannot connect to my Server(runs locally). I have tried to use my Windows account and also the "sa" account. Both doesn't wor...
My VB WPF app is using strongly typed datasets. The connection string is set in the app.config file and is changed via the application settings designer gui. During development I connect to the test database on another server. I want a screen indicator to make it clear that the app is connected to test data.
I know I could parse the co...
Hey,
Does anybody know if you can setup remote connections in gedit(on mac os x snow leopard), so I don't have to keep ftp'ing up seperately.
I know it can be done on Ubuntu but can't figure out how to do it on a mac, if even possible.
...
Hi,
I need to get the data from some lotus connection site, for example user's status, from the other site. I try to setup a connection with lotus via java, e.g.
> server = "https://" + path + param + "&format=full";
> URL profiles_url = new URL(server);
> // Open the URL: throws exception if not found
> HttpURLConnection profiles_...
Greetings Coders.
I'm trying to establish a connection between my Android Phone and an old Dumbphone.
When I use this:
tmp = device.createRfcommSocketToServiceRecord(UUID.randomUUID());
I get:
"Exception: Service Discovery Failed"
With This:
Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
t...