Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330300 - Virgo Snaps example with Spring MVC
Summary: Virgo Snaps example with Spring MVC
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: samples (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Chris Frost CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 19:11 EST by Patsy Phelan CLA
Modified: 2011-07-27 06:19 EDT (History)
1 user (show)

See Also:
eclipse: iplog+


Attachments
Sample Code Bundles. (53.95 KB, patch)
2010-11-15 19:14 EST, Patsy Phelan CLA
glyn.normington: iplog+
Details | Diff
Apply to previous patch to add copyright headers (EPL) (5.46 KB, patch)
2010-11-20 18:15 EST, Patsy Phelan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patsy Phelan CLA 2010-11-15 19:11:46 EST
Build Identifier: 2.1.0.RELEASE

I have a simple snaps example that show how to integrate OSGi services with Spring MVC in a Snap.

Reproducible: Always

Steps to Reproduce:
1.Build the addtional sample code
2.Place in the Virgo Repository, drop the deployment plan in the pickup directory.
3.Visit the url http://localhost:8080/menu
Comment 1 Patsy Phelan CLA 2010-11-15 19:14:07 EST
Created attachment 183179 [details]
Sample Code Bundles.

I have developed the sample code and can contribute this to eclipse on behalf of myself and my employer if need be.
Comment 2 Patsy Phelan CLA 2010-11-15 19:20:20 EST
 I have been setting up a example of SNAPS / Spring MVC using OSGI services. So I
currently have a small example with the following bundles:

menu-sample-deployment.plan
    - deployment plan - will deploy to http://localhost:8080/menu

sample.api
        - Interface & SimpleDao

sample.imp
        - Interface Implementation exporting OSGi Service

sample.snap
        - Simple SNAP, imports my OSGi Service
        - Spring MVC - Index (listing of Daos via Service)
                - Add Dao form
                 - Delete Dao handler

animal.menu.bar -  (the dynamic tabs example - as the snap.host).
  - minor tweak in the web.xml.

 This is pretty generic and very much along the lines of the samples under the
snaps code base. I can contribute this example to the codebase and to eclipse if it
is useful for the project. I have no problem with you guys reviewing it and making
any changes you want to it.  I have moved the code into my local git repo for snaps and
integrated it in with the menu-bar sample. 

 I am not a web (mvc) expert but it works OK at the moment for our internal demo of snaps - so you may have suggestions to make it better on the web front :)
Comment 3 Chris Frost CLA 2010-11-16 09:25:07 EST
HI,

This is excellent. Thank you. As it is over 250 lines I have to run it through the legal process, please could you make sure all the code files have the right license header (EPL). Also, please state that 100% of the code is your own work, we need that wording to make sure it goes through.

Once that is done I'll add it to the snaps repo as a demo application.
Comment 4 Patsy Phelan CLA 2010-11-17 06:22:53 EST
Will do, I will add the headers tonight and upload a new patch. The only one that is not mine as such are the modifications within the build.versions, animal.menu.bar (existing code within the Springsource examples).
Comment 5 Chris Frost CLA 2010-11-17 06:24:54 EST
That's fine, it's already code from Eclipse so it won't matter. Thanks for the effort.
Comment 6 Patsy Phelan CLA 2010-11-20 18:15:39 EST
Created attachment 183532 [details]
Apply to previous patch to add copyright headers (EPL)

Additional patch which applies the EPL license/copyright to the previous patch. There are only 5 java files which need this.
Comment 7 Patsy Phelan CLA 2010-11-20 18:20:36 EST
Hi Chris,
 All the code and files under the sample.api / sample.impl / sample.snap are 100% my own work and as such is being contributed to virgo.snaps if it is wanted under the terms of EPL. I have listed my organisation as Pouzin Society as I initiated and completed these examples for the members of this research group. 

I hope this is all you need - if there is anything else - let me know.

~Patsy
Comment 8 Chris Frost CLA 2010-11-26 09:24:11 EST
Hi,

Just to let everyone know, I have started the legal checking process. Will hopefully be straight forward and I'll be able to get the code in soon.

Thanks again.
Comment 9 Chris Frost CLA 2010-12-10 09:43:46 EST
The legal process is complete and I will commit the code soon, once done I will close this issue.
Comment 10 Chris Frost CLA 2010-12-13 11:01:05 EST
I have applied the patch and given you credit. Thanks again.
Comment 11 Chris Frost CLA 2010-12-13 11:01:46 EST
For reference the CQ is here https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4691
Comment 12 Chris Frost CLA 2010-12-13 11:02:40 EST
Sorry, I lie.

It's here. http://dev.eclipse.org/ipzilla/show_bug.cgi?id=4663