Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1147491

Summary: Unable to start both IPActivator and EPNActivator inside one OSGI bundle (on Fuse)
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Martin Swiech <mswiech>
Component: RT GovernanceAssignee: Nobody <nobody>
Status: CLOSED UPSTREAM QA Contact: Matej Melko <mmelko>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: jpechane, mvecera, soa-p-jira
Target Milestone: ---   
Target Release: FUTURE   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:43:09 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
BundleListActivator - can start and stop more activators none

Description Martin Swiech 2014-09-29 11:47:31 UTC
Description of problem:
The problem is, that OSGI bundle can have only one Bundle-Activator. But we want to activate org.overlord.rtgov.activity.processor.loader.osgi.IPActivator and org.overlord.rtgov.epn.loader.osgi.EPNActivator both inside one jar bundle.

In FSW + JBOSS-EAP is not problem to activate IP and EPN both in one jar.

I think we need some proper common way how a customer can activate them both (and maybe some others, e.g.: ACSActivator, AVActivator, or his own activator...) in one jar.


Version-Release number of selected component (if applicable):
2.0.0.Beta2-redhat-1

How reproducible:
always


Steps to Reproduce:
1. Install Fuse 6.1 + FSW 6.1 DR2
2. Try to create and deploy one OSGI bundle with org.overlord.rtgov.activity.processor.loader.osgi.IPActivator and  org.overlord.rtgov.epn.loader.osgi.EPNActivator both activated.

Comment 1 Martin Swiech 2014-09-29 11:59:31 UTC
Created attachment 942293 [details]
BundleListActivator - can start and stop more activators

I have made this special bundle activator, which can start and stop more activators in one bundle.

Now my manifest file has those parameters:
Bundle-Activator: org.jboss.soa.qa.rtgct.osgi.BundleListActivator
Bundle-Activator-List: org.overlord.rtgov.activity.processor.loader.osgi.IPActivator,
org.overlord.rtgov.epn.loader.osgi.EPNActivator

It's OK in my test (IPActivator and EPNActivator both seem to start and stop properly), but I don't know if this way is acceptable in real OSGI applications.

Comment 2 Gary Brown 2014-10-01 09:21:57 UTC
Although technically multiple components can be packaged in a single war in EAP, e.g. IP and EPN, and this may provide a convenience in some cases, in general I would not recommend this as each component has a different lifecycle/alignment.

For example, IP is closely aligned with the app being monitored, but only relevant on the client side and if using an embedded collector. Whereas EPN is server side, and independent of any specific app - it will mostly represent business policies that have a different lifespan to the apps generating the events.

Similarly ACS - these will have long lifespans - much longer than the EPNs that feed the events they store.

AV - although similar to IP, in that they are client side, they will most likely have a different lifecycle.

Deploying these components in separate units makes it easier to cope with the different locations (client/server) and lifecycles.

I also think it is more appropriate that an OSGi bundle representing one of these four types only contains artifacts for a single type.

This is definitely not a bug. If considered relevant, then it should be raised as an enhancement on the community project.

Comment 3 Jiri Pechanec 2014-10-02 11:18:42 UTC
Well, I think the arguments are valid but it tries to predict what will be the best practices for future customers which I think is pretty inflexible.

It is for example not unreasonable to mix ip+av together and similarly acs+epn.

Would not it be better to use extender pattern? This would offer a flexibility and will allow each customer to define its own policy for use.

Comment 11 Red Hat Bugzilla 2025-02-10 03:43:09 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.