Jakarta HTTPClient

I’m going through the Jakarta HTTPClient package (used in LARM to retrieve web pages) and I don’t understand what function the HostConfiguration class performs.

a) It looks like it’s just a wrapper for a URI that adds proxy server information (so that when the HttpConnection class calls a URI, the HostConfiguration class adds the proxy information to the request). That seem right?

b) What’s up with the developer not providing a lick of documentation for HostConfiguration? Normal? Oversight? Unnecessary? 🙂

Using the volatile keyword in Java

Using the volatile keyword in Java.

The volatile modifier is used when you are working with multiple threads.

The Java language allows threads that access shared variables to keep private working copies of the variables; this allows a more efficient implementation of multiple threads. These working copies need be reconciled with the master copies in the shared main memory only at prescribed synchronization points, namely when objects are locked or unlocked. As a rule, to ensure that shared variables are consistently and reliably updated, a thread should ensure that it has exclusive use of such variables by obtaining a lock that, conventionally, enforces mutual exclusion for those shared variables.

More on Wireless J2ME Applications with Java and Bluetooth

Java Developer’s Journal – Wireless J2ME Applications with Java and Bluetooth: “The oven is great at cooking, but bad at heating food quickly ­ and it’s also pretty expensive. Conversely, the microwave is cheap and great at heating food quickly, but it’s bad at cooking. Both devices have their trade-offs, although either could be used for heating and cooking. How does all this compare to wireless communication?

It’s pretty simple. Wireless LAN (802.11b) is good at connecting two relatively large devices with lots of power at high speeds. A good use of the technology is connecting two laptops at 11Mb/s. Wireless LAN is also good at connecting those devices at long distances (up to 300 ft).

Bluetooth is ideal if you want to connect small devices at slower speeds (1Mb/s) and within a shorter range (30 ft.). Why slower speeds? Isn’t faster better? Isn’t long-range communication a good thing? Not necessarily, especially when you consider the memory and power constraints on smaller devices. Faster connection speeds and longer communication ranges equate to larger power requirements. Why use an 11Mb/s connection if you’re transferring a 50K file between two PDAs?

One of Bluetooth’s strengths is its ability to function as a cable replacement technology. If you have multiple peripherals connected to your computer using RS-232 or USB, then Bluetooth is the ideal solution if you want to use those devices wirelessly. It’s difficult (if not impossible) to connect computer peripherals using 802.11b technology (except for printers). Bluetooth even has a built-in capability for wireless audio communication. To put things succinctly: Bluetooth will never replace 802.11b because it’s bad for:

  • Large file transfers between devices
  • Long-range communication

On the other hand, 802.11b will never replace Bluetooth because:

  • It can’t be used to communicate to peripherals.
  • It requires too much power for small devices.
  • It’s overkill for small data transfers.
  • It wasn’t designed for voice communication.

For the moment in the wireless communications arena, there’s no technology that’s best suited for every possible application. Either Bluetooth or 802.11b can be utilized for wireless communication between computers. Both have their place in the market, and both can perform remarkably well in their niches.

Wireless J2ME Applications with Java and Bluetooth

Java Developer’s Journal — Wireless J2ME Applications with Java and Bluetooth: “Let’s look at a scenario where life is made simpler using Java and Bluetooth technology: the Java Shared Whiteboard. Three employees of Acme Widgets Inc. need to have an impromptu meeting. Unfortunately, no conference rooms are available, so the team is forced to hold their meeting in the cafeteria. They would have preferred using a conference room because each room is equipped with an electronic whiteboard. However, since every member of the team has a Java Bluetooth-enabled PDA, their meeting in the cafeteria is very productive.

One member has a new program for his PDA called the Java Shared Whiteboard. Using Bluetooth technology, he sends that program to the rest of the team. Using Over-the-Air Provisioning (OTA) provided by J2ME, each member installs and runs the application on the fly. The meeting can now begin because the whiteboard is shared among the PDAs. Each participant can draw figures on his or her device and the image will appear instantly on the other screens. To save time, one member can take notes and send them to everyone’s device while the meeting is in progress.

Damp

Got a new laptop yesterday for work, so I had two laptops on my desk at one point. And a glass of water.

So I can’t boot my original laptop now because I spilled the glass of water on the keyboard, which I think then drained right into the HD and other critical components. I’ve *NEVER* spilled anything on this laptop in the 2 years that I’ve had it. Ugh. The drive did work in another machine for about 5 minutes before blue screening. The only thing I need is my 500MB outlook pst file and I’d be happy. Anyone know any good drive recovery specialists in Boston? 🙁

Java application that does searching, indexing, crawling and reporting

Everyone has itches right? Joe has one for an IMAP server. Ray wanted a CFC based blog. I want a Java application that does searching, indexing, crawling and reporting that can be deployed on any servlet container. I’m sure there are people out there that could write one up in a couple days and I’m sure there are already applications that perform these exact functions (for example: ht//Dig does it, just not in Java). I’d like to attack it because I think it would be a fascinating (and fun!) exercise. So anyway, following are a couple of the features I’d like to implement and then some beginning research… I have questions at the end for anyone who has done a project similar in scope to this.

Features