0
votes

I have to investigate the possibility of using JBoss and Seam to build user interfaces to data held in a database controlled by an off-the-shelf package. I've been reading through some of the Seam documentation, and various other sources, but I can't seem to clear the confusion I'm currently suffering from.

My problem is that everything I've read so far talks about using JPA/Hibernate to access and persist data directly in a database schema, but the package I'm working with doesn't allow (or actively discourages) direct updates to any schema that it controls. It does however present what looks like a comprehensive data-access API delivered as an EJB. With the basic assumption that it's entirely possible, my question is how would I go about building a Seam app that uses this EJB for all data access? Is it a simple thing or am I heading for a whole heap of pain? Can anyone point me in the direction of reading material that will help me?

Apologies in advance for the newbie nature of this question, but I've been dropped in at the deep end on this and I'm struggling to pick up so much new knowledge. Any help will be very gratefully received.

Many thanks

Steve

1

1 Answers

0
votes

Seam is mainly an inversion of control (IoC) container that provides a lot of boilerplate functionality for web development. It has no real hard requirements for you to use JPA/Hibernate. It's just that the most usual scenario for Java web development is a database backend that's mapped by an ORM, of which JPA/Hibernate is probably the de-facto standard.

If your data access layer (DAL) does not exist or is just wrapper around an existing API (web services, REST, etc.), Seam will also handle that scenario very easily and provide you with all its remaining functionality (session management, JSF integration, security, navigation flow management and lots more).

In essence, a simple component (or set of) that exposes the API you mention and handles its state should be enough. Then again, I do not know your requirements, so I can't say that for sure.

A more complex example is the Seam Social module in Seam 3. It uses Twitter, Facebook or other social web APIs to connect to those services and inject them into Seam's contexts', so that your application can leverage their functionality. I don't know if your scenario is so complex that it would require you to build an entire CDI module from scratch (as Seam Social does) but take a look at their documentation. It might give you some ideas on what further investigate.