Presentation is loading. Please wait.

Presentation is loading. Please wait.

OpusCollege and Spring-DM. OSGi based web applications – three strategies OSGi container embedded in another container: OSGi Bridge Server (OBS)  e.g.

Similar presentations


Presentation on theme: "OpusCollege and Spring-DM. OSGi based web applications – three strategies OSGi container embedded in another container: OSGi Bridge Server (OBS)  e.g."— Presentation transcript:

1 OpusCollege and Spring-DM

2 OSGi based web applications – three strategies OSGi container embedded in another container: OSGi Bridge Server (OBS)  e.g. OSGi within Tomcat or Jetty  controlled through a bridge servlet (for instance Equinox) front controller dispatches servlet requests to bundles OSGi container with a http-container on top of it  PAX Web solution: only have an OSGi runtime with an HTTP-container (Jetty) on top of it OSGI container with all other services / servers /.. as bundles within it (complete Equinox solution)

3 OpusCollege -> choice OSGI container with all other services / servers /.. as bundles within it (complete Equinox solution)

4 OpusCollege -> choice Wait with implementation:  Waiting for Apache Tomcat integration  First implement first final core version First steps already now:  Start with structuring the application through several projects (modules): first one is Fees module  Bind the projects together with Ant -> one WAR- file  But: only small changes necessary for implementation as separate bundles

5 OpusCollege – new structure Several projects:  1 repository-project: repository  1 or more modules: fee, scholarship  1 core-project: college  1 target-project: opus All projects have their own build.xml

6 OpusCollege – new structure Repository-project:  All libraries (as jar-files) of the core- and module-projects  Each library has a fixed structure with directories (see: mvnrepository.com)  Eclipse build path: you have to select all jars for order and export

7 OpusCollege – new structure Module-project:  Default structure (maven-based): Src/main/java Src/test/java Src/main/webapp/WEB-INF/modules/module-name Src/main/webapp/WEB-INF/views/module-name  Has own configuration files: Org.uci.opus.module-name/application.xml (context) Org.uci.opus.module-name/messages.properties Src/main/webapp/META-INF/MANIFEST.MF Src/main/webapp/WEB-INF/modules/module-name/web- context.xml (applicationContext)  Eclipse build path: Dependency towards core and repository project

8 OpusCollege – new structure Core-project:  Has everything a module-project has Note: web-context.xml has some extra’s:  InternalResourceViewResolver  Interceptors: ModuleInterceptor  ModuleMessagesRegistrar  Extra (1): webapp/WEB-INF/web.xml  With dispatcher-servlet: opus webapp/WEB-INF/log4jconf/  with debug.properties and warn.properties webapp/WEB-INF/jdbc.properties webapp/index.html

9 OpusCollege – new structure Core-project:  Extra (2): org.uci.opus.college.module package:  webapp/WEB-INF/SqlMapConfig.xml cannot be made statically, because it is build up dynamically: see CombinedSqlMapResource  Number of modules is counted dynamically and used throughout the application: see Module and ModuleInterceptor  Messages.properties files of core and modules are gathered together: see ModuleMessagesRegistrar

10 OpusCollege – project structure Target project:  Nearly empty project, only with: Applications-directory: here you specify the application you want (with one or more modules). Every application has it’s own build.xml, that uses common- build/application-targets.xml Common-build-directory: here you specify the actions you have to perform for each application:  application-targets.xml: Clean target-project, copy application-files, compile  web-targets.xml: Create war-file  Eclipse build path: dependency towards repository-project

11 Eclipse projects - ‘bundles’ Demo structure eclipse repository

12 Questions ???


Download ppt "OpusCollege and Spring-DM. OSGi based web applications – three strategies OSGi container embedded in another container: OSGi Bridge Server (OBS)  e.g."

Similar presentations


Ads by Google