Posted by felipegaucho
on June 2, 2008 at 1:49 AM PDT
EJB3 makes it really easy to create web-services but sometimes I
feel unsafe to expose my business components unfiltered on the web. That
is the first of a series of open questions I plan to discuss during
More than a community and business event,
href='http://jazoon.com/en.html'>Jazoon'08 offers you a chance to
discuss technology free of pressure. You can meet the top evangelists
and share with international developers your technical issues and
questions - a pervasive brain storm about the Java platform. Excellent
opportunity to validate your ideas on how to do better software - and
if they don't survive the community's scrutiny, you can always blame
the beers and back home with good learned lessons :).
I have my own set of (Not
So) Stupid Questions , and the first one I want to discuss with you is
about web-services and EJB3.
Is it a good design to expose EJB3 Session Facade as
on the Internet,
+ @WebService seem to be a fast and furious way to go straight to SOA
with few lines of code and a
good container . Despite the simplicity of annotations, I
started designing an Open
Source Classifieds system based on J2EE technologies and I have some
observations about that.
Instead of replicating here all discussions about web-services
design and its technology support, I prefer to bring you a few design
options and get your feedback live during Jazoon.
- Web Client -> JAXWS SOAP web-services -> Session Facade ->
Domain Model Facade -> @Entities
- Web Client -> @WebService Session Facade -> Domain Model
Facade -> @Entities
- Web Client -> @WebService Session Facade -> @Entities
Some considerations about the above design options:
- If I use annotations, I am assuming SOAP web-services, right?
And what about REST?
- If I do expose my Session Facade directly, how can I change
later my interface from SOAP web-service to something else ?
- What about validation and security? My business component
should care about data input validation and authorization and
- Load balance and orchestration. Can I use a web server (Tomcat?) to expose the service interface and a j2ee container to do the business? What about service collaboration? The session beans will have references one to each other?
Using a same class to expose services interface and realizing
business use cases seems a bit overlapped to me, but eventually I am
missing some point here. It is up to you, see you in ZÃ¼rich :)