I got to thinking on my way into work this morning - is there an Instant Messaging API for Java. I suppose it would help if there was an IM standard, just like there's an e-mail standard (SMTP). I suppose that Jabber is kinda close. Here's why I'm interested. There's a few things I get e-mails on now that are simply "notifications." For instance, Log4j errors, Anthill build notifications and comment notifications from this site. I'd love to be able to program these to call a more configurable messaging system - so I could set it to send me IM's or possibly even SMS messages (the problem with SMS is it costs $$ now). I suppose I could setup a Jabber server and use their API to send messages, but I'm hoping this is already done for me. It'd be slick to parse an e-mail address and based on whether it's @hotmail, @msn, @yahoo or @aol, it'd send it through the appropriate gateway. Anyone know of an API that makes with as easy as sending e-mail with JavaMail?
Danno Ferrin asks "Where's the $$ at in Java?" I don't think I have the answer to this, but I can say that the money has certainly declined in the last year. I wanted to comment on this post, because I think I've found myself an interesting niche. There seem to be few Java Developers that know UI Development stuff like CSS, HTML and JavaScript. When I say know, I mean really know it in the sense that they could construct a good looking web page from scratch. On most of the projects I've been on, sure there have been UI Developers, but that's all they knew was CSS, HTML and JavaScript - they didn't know much Java (if any at all). I'm not saying it's impossible for developers to know both Java and UI Technologies, just that it's rare. So if you want to create a niche for yourself as a Java Developer - learn the UI stuff. If you're a UI Developer, learn the Java stuff. It can't hurt can it?
In my security chapter, I am describing HTTP Digest Authentication (please correct me if I'm wrong on any of this).
This (HTTP Digest) authentication mechanism identifies a user based on a username and password, and the client transmits the password in an encrypted form such as SHA or MD5. HTTP 1.1-enabled browsers are required to support it, at least according to this page. According to the Servlet 2.4 spec, it is not currently in widespread use, and therefore Servlet containers are not required to support it.
Now for the part I need help on. Which of the following servers support HTTP Digest? Tomcat, JBoss, Resin, Orion, WebLogic, WebSphere and Sun ONE. To test this, in your web.xml
you would configure your <auth-method> to be DIGEST:
<security-constraint>
<web-resource-collection>
<web-resource-name>My Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>DIGEST</auth-method>
<realm-name>My Test Application</realm-name>
</login-config>
According to this implementing WebSphere Security article from December 2002, WebSphere 4 doesn't support it. I wonder if version 5 does? Thanks for any assistance you can offer!
Update: I was missing a required element (<web-resource-name>) in the XML above, and I added <realm-name> for display on the dialog box. Tomcat (v4.1.18) supports DIGEST just fine. The dialogs do change between the types though - the differences are below.
HTTP Basic Dialog
HTTP Digest Dialog
A nice community-enhancing developer (I don't know who) has posted an XDoclet for Hibernate tutorial on Hibernate's Wiki. Good stuff. Since the XDoclet doco is kinda cryptic, it'd be awesome if someone did this for Struts. Maybe in my spare time. Oh wait, I have none of that - at least not this week.
I think XDoclet and Hibernate work well together when creating a database schema from scratch. However, I've found that Hibernate's Reverse Engineering Tool works much better for me. It generates the .java and .hbm.xml files for me and I'm done. Hook up a DAO and a DAOTest and I'm done! I might look at Middlegen's recently added Hibernate support in my next class-generation cycle. To my knowledge, it creates an XDoclet-enabled .java file that can then generate the .hbm.xml. However, I'm using a lot of composite-id stuff and XDoclet doesn't seem to support that. From the above XDoclet for Hibernate article:
Note that XDoclet will not be able to support the new composite features.