|
Article Excerpt My laptop goes where I go. Some people like to read; I like to hack code. Just ask my wife--I took the laptop on vacation to the Cayman Islands. The problem I'm having is that I can never predict the state of my online connection. At home I'm wireless; at work, wired. In between, such as my 90-minute daily train commute, I'm neither. Don't get me started on the lousy connectivity from the beach. That downtime is a serious productivity killer, since all my Web-enabled code becomes unstable. There are many layers to a J2EE application these days and I don't control all of them, so I have no guarantee that my app will behave properly if a connection fails. Worst case scenarios--I might time out, hang, or crash altogether.
The thing is I can predict my downtimes. If I take my network card out, it's a safe bet I don't have a connection. Instead of tackling the rather large problem of detecting a good network connection, I took a different approach. I started researching whether I could tell my application that I definitely did not have a connection. If I could easily write something that says "If not connected, then don't try to perform Net-sensitive code," that would take care of the majority of my downtime. After some research I discovered that java.net. NetworkInterface, new in Java 1.4, does almost exactly what I need.
Guaranteeing that a machine is "online" is near impossible...
|
|

More articles from Java Developer's Journal
ExtenXLS Java/XLS Toolkit 2.1. (Labs)., July 01, 2003 West Web Services Edge 2003. (International Web Services Conference & ..., July 01, 2003 Fiorano releases FioranoMQ 7.0. (Industry News)., July 01, 2003 Wily Technology integrates Introscope 4.1 with Oracle9iAS. (Industry N..., July 01, 2003 Oak Grove Systems introduces new managed source licensing model. (Indu..., July 01, 2003
Looking for additional articles?
Search our database of over 3 million articles.
Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication
name or publication date.
About Goliath
Whether you're looking for sales prospects, competitive information, company
analysis or best practices in managing your organization,
Goliath can help you meet your business needs.
Our extensive business information databases empower business
professionals with both the breadth and depth of credible,
authoritative information they need to support their business
goals. Whether it be strategic planning, sales prospecting,
company research or defining management best practices -
Goliath is your leading source for accurate information.
|
|