Re: Creating a Extension/AddOn for JOnAS
Loris Bouzonnet <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <[email protected]> |
Hello,
iPOJO doesn't need to be installed on Eclipse. For starting you should
just define an OSGi bundle by following these steps :
* Write a POJO
* Write the OSGi manifest file
* Write the iPOJO metadata file
* Configure the Maven plugins of your pom.xml, for example :
...
<packaging>bundle</packaging>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<_include>src/main/resources/META-INF/${project.artifactId}.bnd</_include>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-ipojo-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<classifier>ipojo</classifier>
</configuration>
<executions>
<execution>
<goals>
<goal>ipojo-bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
* Put the output into the deploy dir of JOnAS.
Ok now if that works, you can decide to make a service with this bundle.
So you have to do the following steps:
* Define the deployment plan for your service (by the way you can
reference some others required bundles) and put it into the directory
repositories/url-internal (see
http://jonas.ow2.org/JONAS_5_1_4/doc/doc-en/html/deployment-plans_guide.html)
If your service is called myservice, the deployment plan file will be
named myservice.xml.
* Add the service config into jonas.properties
jonas.services .......,myservice
jonas.service.serv1.class a.b.myservice.internal.MyService
When you add your service into the config, JOnAS will automatically
lookup into the repositories/url-internal for the file myservice.xml
If you have any errors, please send us the stacktraces.
Best regards,
Loris
on 22.11.2010 23:49 ajinkya prabhune said the following:
>
> Hello,
>
> I was referring to the JOnAS web page where they said u can create a
> service using iPOJO
> but I am not able to install iPOJO on eclipse...
> Could someone tell me how to create addon/extension for JOnAS
> step wise guide will be very helpful
> Thanks in advance
>
>