Bens Stuff

Tuesday, September 14, 2004

It's amazing the amount of material out there

If only I searched better before posting my previous message. Just perusing the OReilly site gave me lots of good info on EJB's.

Business Logic, Part 1

Business Logic, Part 2

Business Logic, Part 3

J2EE Application Deployment Considerations


I now realize the fullness of my ignorance of EJB's. From skimming those articles I probably need to architect a whole system instead of just using a bean here and there. So in my case without a database, I'd need to have some sort of facade that accepts requests from clients. This facade makes CICS requests to our mainframe, but at some point could be switched out for entity EJB's accessing a database repository. The clients to my facade will be stateless session beans that act as a data abstraction layer to my datastore. I don't want my presentation layer knowing anything about how the data is stored. That's what my SLSB's are for, just a facade on the datastore facade/entity ejb. That would be my business logic layer who accepts and returns data transfer objects. My web tier is pretty much servlets and JSP's and can probably stay as is.

I wanna be an EJB Cowboy baaaby

Sorry for the Kid Rock ref ;) I am tired though, of not knowing EJB's. I've just not had the exposure to them. Some people would consider me lucky in that respect (i.e. Spring supporters). But it would be nice to fill in that area of my knowledge of J2EE. I know servlets, JSPs, MVC frameworks, some design patterns, and all that stuff, but never got a chance to use EJB's. Seeing as how my division here at work loathes databases it's not hard to see why. We've been storing everything on mainframes and using it as our data repository. I suppose I could jump right over EJB's and go for Spring. However, since I've never used EJB's I don't know how bad they are. Maybe if I learned them, then started to hate them, I would be more motivated to learn Spring. Anyways, EJB experience look good on a resume though right?

So I guess what I'm asking is where do I start? Stateless session beans seem to be en vogue, as well as message driven beans. Obviously MDB's require some messaging framework to be in place so I can probably rule that out for starters. Stateful session beans require persistance and therefore a reliance on databases. Wonder if I could do a CICS transaction mapping to a SFSB? I can probable call CICS transactions from an SLSB just as I do now. Maybe I should start there...

Anyone have any thoughts for an EJB beginner?