Sunday, May 23, 2010

Re: [android-developers] Connection is broken error when try to connect to remote HSQLDB web database

Tim wrote:
> I have to say that up until now I have had much success using JDBC and
> Android.

JDBC is not designed for fragile, latency-ridden data connections. For
WiFi, you may be able to get away with it, assuming your users' feet are
nailed to the floor, so they cannot wander away in the middle of a
transaction. 3G and EDGE are worse yet.

I wouldn't even use JDBC over the Internet from a fixed-location desktop
situated atop a 99.9999% reliable pipe, because even if the local
connection to the Internet is fine, that's not going to be the case for
the rest of the hops to the server and back.

JDBC from a fixed location on a LAN -- what it was designed for -- is
perfectly fine, though.

> So what is trying to
> create such a large array and where is the error message coming from?

Since you declined to provide a stack trace, that's impossible to answer.

> Secondly I understand that each JVM instance has a 16 MB limit.

Actually, that varies. Devices with larger screens and more RAM get a
24MB limit, IIRC.

> My app
> says that it is using 5 MB and that there is 1.35 MB left. So what
> would be using the other almost 10 MB in my JVM instance? How do I
> get/use more of it?

Here are some links to help you get started:

http://groups.google.com/group/android-developers/browse_frm/thread/9999d04e0c8d6389
http://stackoverflow.com/questions/2203806/android-eclipse-mat-does-not-appear-to-show-all-my-apps-objects
http://stackoverflow.com/questions/2298208/how-to-discovery-memory-usage-on-my-application-in-android/2299813#2299813

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.5 Available!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment