SOA and EJB
I've been working on a project that has adopted a Service-Oriented Architecture (SOA) approach. It's greatly affected the overall application architecture, largely for the better.
However, I have been occasionally perplexed by the problem of figuring out what protocol to use for inter-component communication. Enterprise Java Beans (EJBs) are great for distributed native object interactions, but the Remote Method Invocation (RMI) protocol is not always network-friendly and has a bit of overhead. On the other hand, XML Web Services are very network-friendly, but don't provide the complex object interactions capable over RMI.
So, when do you use EJB and Web Services? I like both, but it irks me to have a heterogeneous architecture employing such different technologies. I have found a couple good resources throughout the process:
http://dev2dev.bea.com/pub/a/2004/05/soa_wilkes.html