Java EE 6 Application with OSGi

I had application development on JSF, EJB and JPA. The JSF side with ManagedBeans and Facelets is in war-module, and my EJBs are in ejb-module. This is not a big thing, say 20 pages, 15 ManagedBeans and a few objects and EJBs. This is part of my undergraduate dissertation and one of the requirements says that I need to make this system modular, and I must use this technology OSGi.

So, my knowledge about OSGi is practically absent, and after several hours of work at Google, I have not made any progress. Therefore, I would like to ask you, how would you divide this application into modules? Can you point me to some textbook or article describing such a procedure? Because I did not find anything that would fit my scenario.

This application is designed to manage student projects at the university. Thus, there are two roles: teacher and student. Both of them can create projects, the teacher confirms them, the students represent them.

Here is my project structure

ejb modulewar module

I don’t want you, of course, to give me the whole solution, but I would be glad if you would give me something to begin with.

Thank you so much

+3
source share
1 answer

In a nutshell, OSGI modules are provided in the form of packages that can be started, stopped, modified without breaking other parts of the application.

When you break your script into packages, you will have:

  1. Service (EJB in your case)
  2. ServiceLocator (which in this case will be used by clients like your jsf, this may be part of your client itself)
  3. Client (JSF in your case)

    . , , view, dao e.t.c, , .

  4. , , .

Java EE OSGI - @Oracle Wiki

+2

All Articles