you need:

register your first bundle in the osgi platform: Declarative services -
component based or a simple class activator to register the service
(interface) you provide. (also export the service package in the manifest
file)

In your test bundle:

- get the service you have registered
- It is recommended to track the service you have created in order no to get
null pointers referred to the service...


You can find easy examples on the web of how to register a service using an
activator class and how to consume the service


Miguel
Sent from Madrid, Spain

On Thu, Dec 3, 2009 at 10:58 AM, Asier Aranbarri Beldarrain <
[email protected]> wrote:

> Good morning all:
>
> I have a little issue since i'm a reeeeal noob in OSGi. I have two packages
> in a Java Project that I need to become two separate OSGi bundles.(Using
> Eclipse)
>
> The body of the Java Project is this:
>
> *JavaProjectNumberX
>
> *---->*SRC*
> ---------->*packageSRC*
> ----------------->class 1.java
> ----------------->class 2.java
> ----------------->interface 1.java
>
> ---->*Test*
> ----------->*packageTest*
> ------------------>Test.java
>
>
> What I need is two bundles, the first one with the SRC package classes, and
> the other one, with the TEST package.
>  The reason is that I want the "*Test-Bundle*" to *access *to the "*
> SRC-bundle*" and execute the functions of it.
> I mean, I need that the bundles make exactly the same thing that they do
> those classes right now, in the Java Project.
> Hope that you understand, thanks,
>
> Asier.
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to