Issue Details (XML | Word | Printable)

Key: DIRMINA-27
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Trustin Lee
Reporter: Trustin Lee
Votes: 4
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
MINA

OSGi framework integration

Created: 07/May/05 03:16 PM   Updated: 30/Nov/07 09:05 AM
Return to search
Component/s: None
Affects Version/s: 0.7.0, 0.8.0, 0.9.0
Fix Version/s: 2.0.0-M1

Time Tracking:
Not Specified

File Attachments:
  Size
File MANIFEST.MF 2006-11-02 12:48 AM John Conlon 2 kB
XML File Licensed for inclusion in ASF works pom.xml 2006-11-02 09:33 PM John Conlon 5 kB

Resolution Date: 03/Nov/07 01:15 AM


 Description  « Hide
It's just an update of the MANIFEST files. Never related with API design, so won't fix in 2.0.0-M1.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trustin Lee made changes - 04/Dec/05 11:34 PM
Field Original Value New Value
Assignee Trustin Lee [ trustin ]
Trustin Lee made changes - 26/Feb/06 09:32 AM
Fix Version/s 1.1 [ 11071 ]
John Conlon added a comment - 25/Oct/06 09:14 PM
If mina 1.1.0 consolidates to one project, the maven-osgi plugin can easily create a jar that is also an OSGi bundle.

John Conlon added a comment - 01/Nov/06 11:53 PM
Since the creation of a single project Mina appears to be shelved. To move the OSGi effort forward, I would like to create a OSGi bundle for wrapping the current Mina 1.0.0 release.

Before I attach the pom.xml for the project called mina-integration-osgi
I have a few questions of the community.

Java 1.4?
My first intention was to do this for Java5, but do we also need an OSGi wrapping project for a java 1.4 of Mina 1.0.0?

Wrapped Dependencies?
In the example I am showing below is for a Java5 release (no backport libs)

Here are the dependencies that will be wrapped in the bundle:
               <dependency>

<groupId>org.apache.mina</groupId>

<artifactId>mina-core</artifactId>

<version>${pom.version}</version>

</dependency>

<dependency>

<groupId>org.apache.mina</groupId>

<artifactId>mina-java5</artifactId>

<version>${pom.version}</version>

</dependency>

<dependency>

<groupId>org.apache.mina</groupId>

<artifactId>mina-filter-ssl</artifactId>

<version>${pom.version}</version>

</dependency>

<dependency>

<!--This dependency is using several transients

net.gleamynode.netty2.mina-->

<groupId>org.apache.mina</groupId>

<artifactId>mina-filter-codec-netty</artifactId>

<version>${pom.version}</version>

</dependency>

<dependency>

<groupId>org.apache.mina</groupId>

<artifactId>mina-filter-compression</artifactId>

<version>${pom.version}</version>

</dependency>

<dependency>

<groupId>org.apache.mina</groupId>

<artifactId>mina-integration-spring</artifactId>

<version>${pom.version}</version>

<exclusions>

                           <exclusion>

                              <groupId>org.springframework</groupId>

<artifactId>spring-beans</artifactId>

                           </exclusion>

                           <exclusion>

                              <groupId>org.springframework</groupId>

<artifactId>spring-core</artifactId>

                           </exclusion>

                         </exclusions>

</dependency>

<dependency>

<groupId>org.apache.mina</groupId>

<artifactId>mina-integration-jmx</artifactId>

<version>${pom.version}</version>

</dependency>
Are these dependencies all that need to be delievered in the bundle to meet Mina 1.0.0 functionality?

Provided Dependencies?
At OSGi runtime the two additional dependencies will be provided by other OSGi common use bundles wrapping:
<dependency>

<groupId>commons-collections</groupId>

<artifactId>commons-collections</artifactId>

<version>3.0</version>

<scope>provided</scope>

</dependency>

<dependency>

<groupId>org.slf4j</groupId>

<artifactId>slf4j-simple</artifactId>

<version>1.0</version>

<scope>provided</scope>

</dependency>
Are there any more dependencies that I am missing?

Ignored Dependencies?
The OSGi Maven Plugin provides an analysis mode so one can tell library depenency usage. When bundleing Mina 1.0.0 the analysis is showing an unusual circular dependency on a no longer used mina library.

[INFO] org.apache.mina.protocol used by;
          +-- net.gleamynode.netty2.mina

[INFO] org.apache.commons.logging used by;
          +-- net.gleamynode.netty2

[INFO] net.gleamynode.netty2 used by;
          |-- net.gleamynode.netty2.mina
          +-- org.apache.mina.filter.codec.netty

I have a hunch that I can simple ignore the org.apache.mina.protocol library.
Is there any reason I can't?

Pending imput I expect to attach the project pom tomorrow.

John Conlon added a comment - 02/Nov/06 12:48 AM
Here is an example of the Manifest.MF for a created OSGi bundle.

John Conlon made changes - 02/Nov/06 12:48 AM
Attachment MANIFEST.MF [ 12344149 ]
John Conlon added a comment - 02/Nov/06 09:33 PM
This pom.xml can be use with a Java5 version of Mina 1.0.0.

John Conlon made changes - 02/Nov/06 09:33 PM
Attachment pom.xml [ 12344244 ]
Trustin Lee added a comment - 12/Jan/07 02:41 AM
Sorry for catching up this issue late. Is your patch still applicable for MINA? I think Netty stuff can be ignored. Please let me know if anything has changed since then.

John Conlon added a comment - 15/Jan/07 05:05 PM
Yes as a matter of fact the latest Mina OSGi work is still on the apacheDS. You will find three projects in sandbox/jconlon/osgi-mina. These projects are for the Mina 1.1.

The first of these projects is mina-integration-osgi this is a wrapping bundle for mina. The second mina-osgi-example is a OSGi version of the Chat example. The third mina-osgi-example-integration-test is a Spring-OSGi based testing framework for the second project.

I have not moved them to my Mina sandbox or said much about them because many of the third party dependencies Enrique and I built for OSGi enabling ADS are in the process of moving to the OSGi felix commons area. Additionally the Spring-OSGi efforts are in a state of flux so the testing framework is not very stable nor is it available from stable maven repos.

However the main osgi bundling of mina 1.1 (mina-integration-osgi) should build for you as it does me right now.

The other two projects are a bit more bold in their use of third party snapshots and thus are more shakey as they require sets of pre-built dependencies that you won't likely have. Time will fructify these dependencies and we should have something provided by third parties soon.

Would you like me to create a OSGi wrapper project for the latest trunk?

Trustin Lee added a comment - 16/Jan/07 01:42 AM
> Would you like me to create a OSGi wrapper project for the latest trunk?

That would be great!

Repository Revision Date User Message
ASF #579993 Thu Sep 27 12:44:44 UTC 2007 trustin Resolved issue: DIRMINA-27 (OSGi framework integration)
* Upgraded to felix bundle plugin version 1.0.0
* Polished the POM a little bit
Files Changed
MODIFY /mina/trunk/filter-codec-http/pom.xml
MODIFY /mina/trunk/core/pom.xml
MODIFY /mina/trunk/filter-compression/pom.xml
MODIFY /mina/trunk/protocol-http-server/pom.xml
MODIFY /mina/trunk/integration-jmx/pom.xml
MODIFY /mina/trunk/filter-codec-netty/pom.xml
MODIFY /mina/trunk/integration-spring/pom.xml
MODIFY /mina/trunk/pom.xml
MODIFY /mina/trunk/transport-apr/pom.xml
MODIFY /mina/trunk/transport-serial/pom.xml
MODIFY /mina/trunk/protocol-http-client/pom.xml

Trustin Lee added a comment - 27/Sep/07 12:46 PM
This issue has been resolved by using Apache Felix maven-bundle-plugin v1.0.0. All MINA modules are now OSGi bundles thanks to the bundle plugin. Please confirm the fix and let me know.

Trustin Lee made changes - 27/Sep/07 12:46 PM
Resolution Fixed [ 1 ]
Fix Version/s 2.0.0-M1 [ 12312171 ]
Assignee Trustin Lee [ trustin ]
Status Open [ 1 ] Resolved [ 5 ]
Trustin Lee added a comment - 30/Sep/07 03:42 PM
It seems like the latest felix bundle plugin doesn't work well with multiprojects. I think we need to wait for the better plugin to be released.

Trustin Lee made changes - 30/Sep/07 03:42 PM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Trustin Lee made changes - 30/Sep/07 03:53 PM
Fix Version/s 2.0.0-M1 [ 12312171 ]
Description It's just an update of the MANIFEST files. Never related with API design, so won't fix in 2.0.0-M1.
Affects Version/s 1.0.0 [ 11070 ]
Trustin Lee added a comment - 03/Nov/07 01:15 AM
All JARs are now OSGi bundles. I used maven-bundle-plugin + some Ant tasks. It seems to load OK in Felix. Any external dependencies will need to be provided as OSGi bundles though (e.g. jzlib and rxtx).

Trustin Lee made changes - 03/Nov/07 01:15 AM
Resolution Fixed [ 1 ]
Fix Version/s 2.0.0-M1 [ 12312171 ]
Status Reopened [ 4 ] Closed [ 6 ]
rason yang added a comment - 30/Nov/07 09:05 AM
Great!
I am really really eager for this feature!
Thank you!