A first blog: presenting the case for simpler Java EE samples ...
OK. Here is a poll. How many developers feel that it is very easy to try simple examples out with a Java EE implementation like GlassFish? One caveat is that you must be "absolutely not familiar" with the technology. For example, how easy is it to try out a servlet sample that updates a database using a resource?
In my view, it is not as easy as I'd have liked, at least with GlassFish. There is a huge room for improvement. I am sure that's true with any application server vendor. And that, in part, is a reason for developers taking time to learn Java EE. The setup time is rather too much.
Last night, I was just trying to deploy an application like jdbc-simple.ear that shows how a servlet can greet a visitor and shows a record of how many visitors have already been greeted. Simple, huh? Here is what I ran into:
- I had the servlet with a resource reference. But the resource was not created just by deploying the application. I was under the impression that I have to just do asadmin deploy jdbc-simple.ear and I am done. No, you've got to create the resources.
- OK, perform a step like creation of resources, creation of jdbc connection pool and so on.
- Remember to start the database! Even when the vendors come integrated with database, you've got to remember to start the database server.
- You still have to create the schema for the database. For example, it asked me to create a table called DERBYPUBLIC with a specific schema. Whew, what a mess. I have to connect to the Database, use the Runtime tab of NetBeans IDE, create the schema. But wait a minute, I don't know the schema! I don't know what column names are, datatypes are and so on.
May I just suggest having all the configuration/setup a part of the sample application itself? Deployment of the sample application should be all you need.
- Login or register to post comments
- Printer-friendly version
- km's blog
- 482 reads





