By ByronNevins on Jun 11, 2007
- HTTP File downloading (HyperText Transfer Protocol)
- JSPs (Java Server Pages)
- User Authentication - Basic, then File Realms, then JDBC Realms
- Derby Database
- JNI (Java Naming Interface)
- EJB 3.0 (Enterprise Java Beans)
- JPA (Java Persistence API)
- EJB Timer Service
- JSP Tag Libraries
- MDB (Message Driven Beans)
Chapter 0: The Application DescriptionDr. Dean Edell has an interesting radio talk show on KGO radio in San Francisco. His show is from 1 to 2 PM Monday through Friday. KGO posts an mp3 file for the show once a day. KGO takes it down, forever, after 24 hours. KGO does not maintain an archive of old shows. I like to burn the shows onto CDs and listen to them in my car. What this application will do is:
- Automatically download the mp3 at 11:38 PM every night, Monday through Friday and save them to a subdirectory of docroot on my Glassfish Application Server.
- Maintain user accounts for people that wish to download the files. New accounts will be accepted and added to the list on demand.
- The application will persist which files have been downloaded for each user. When a user is authenticated he will see his own custom list of programs he has yet to download.
- A list of all available programs will also be available in case of trouble (like the dog eating the Dean Edell CDs)
This sounds like a lot of overkill for such modest sounding requirements. But making it 100% automatic is a bit challenging. Besides, the whole point of this is to create an application - any application -- in order to learn how to do all this stuff. We will start simple but thorough and correct. We will constantly change and modify it to use the cutting edge Java EE technology as the tutorial progresses.
Stay Tuned for the next installment, Chapter 1:
Write a stand alone Java application that will download the mp3 file. The OS will be in charge of running this application via a chron/at job.