This is a little embarrassing considering I have been meddling around with
Karaf for a while now.
I have a service implementation bundle and a CXF-REST bundle. If I throw in the
REST bundle before the ServiceImpl bundle into my deploy folder, it waits for
the service bundle for a few seconds and then goes into a Failed state.
Obviously, all goes well if I do it in sequence - ServiceImpl first and REST
next. I wanted my REST service to wait forever until the ServiceImpl is
deployed (just like the rest of the OSGi bundles)
My guess is that there is some place where I should be increasing the timeout
to wait forever. This guess is based on the fact that for a PaxExam test, I
should do so.
@Inject
@Filter(timeout = 300000)
BootFinished bootFinished;
(source : KarafTestSupport.java)
Am I looking at the wrong place or should I be looking at other places for
hints like Activator or Import/Export packages?
My REST maven-bundle-plugin looks like this :
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-Activator>xxxx.xxx
.rest.Activator</Bundle-Activator>
<Import-Package>*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
I understand that deploying as a .kar file along with the the rest of the
libraries (I deploy the dependencies as a .kar) would solve it but I do not
want to do that for the REST and Impl bundles because of faster deployments
(and bandwidth sizes - I am on EC2).
Cheers,
Arun Manivannan