Christian Campo schrieb:
Ok now I understand what you are doing. The fact that
service.id 1717 is also implementing the Business Interface
(FahrerRemoteManger) is not necessary but also does not hurt you. So it
looks ugly but it will work is all I can say.....
yes, it works - I only tried to avoid the 800 twice registered services
for the same work ;-)
because I cannot change this I'm now doing this:
* add all the ejb.xxx properties from EasyBeans also to my (new
registered) service
* set service.ranking to max value
so if someone simple gets a service for the interface, I know the right
one will be used
Maybe we could implement a better solution in Riena if you could
specify how that should work. Just you need to understand that
properties and configurations are two things.
I have known this before, but thought there's an easy way to get the
extra information for Riena using a ConfigurationListener
So configurations that you managed service receives is
nothing that is visible to a Riena publisher.
yes - I noticed this ;-)
perhaps later I'll do some fine-tuning and see if there's a "better
looking" way avoiding unneccesary services
but at the moment the most important is that it works :-)
and I can do my work for the client
I should work on the milestone :-)
hehe :-)
next week my vacations are finished and after getting all for the
server (Riena + Easybeans) running
I'll focus on Client / UI / ObjectTransactions and of course am waiting
for M4
thx again for all the great work from your team
ekke
otherwise it will never come out
christian
Am 29.08.2008 um 14:08 schrieb ekkehard:
Christian Campo schrieb:
exactly.....
Your service instance implements two interfaces. So it needs to
register twice. Well actually I think you can register a service with a
list of interfaces. However the problem is that the properties are set
later for the second interface and these properties are immutable.
only to verify that we talk about the same ;-)
in the example below:
first Service:
service.id=1717
implements 2 interfaces:
a) org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI
b) org.osgi.service.cm.ManagedService
second service:
service.id=1718
implements 1 interface:
org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI
(same as service.id 1717 a)
1717a) and b) are registered from EasyBeans and have some properties
from EasyBeans
1718 is registered by me and has set the Riena properties
so I have two services for exactly the same Interface
regards
ekke
So I see no other solution. Not sure if
ConfigAdmin is overkill for this or not. Thats up to you. Depends how
flexible your protocol and url properties have to be (are they static
or do they change between starts of the service instance).
regards
christian campo
Am 29.08.2008 um 10:59 schrieb ekkehard:
Christian,
I followed your advice:
while tracking my ManagedServices and filtering the ejb Services:
.........
Object service = context.getService(reference);
........
Dictionary properties = new Hashtable(3);
properties.put(RSDPublisherProperties.PROP_IS_REMOTE,
Boolean.TRUE.toString());
properties.put(RSDPublisherProperties.PROP_REMOTE_PROTOCOL, "hessian");
properties.put(RSDPublisherProperties.PROP_REMOTE_PATH,
"/WS_"+reference.getProperty("ejb.interface"));
then I register the service itself for the interface with Riena
Properties:
context.registerService((String)reference.getProperty("ejb.interface"),
service, properties);
now I'm having these services:
{org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI,
org.osgi.service.cm.ManagedService}={service.pid=org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI:FahrerManagerBean,
ejb.id=4543710,
ejb.classname=org.ekkehard.abc.dataManager.mitarbeiter.FahrerManagerBean,
ejb.name=FahrerManagerBean,
ejb.interface=org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI,
ejb.container.name=org.ekkehard.abc.dataManager, service.id=1717}
Registered by bundle:
initial@reference:file:../../ekkehard/plugins/org.ekkehard.abc.dataManager_1.0.0.jar/
[28]
Bundles using service:
initial@reference:file:../../ekkehard/plugins/org.ekkehard.server_1.0.0.jar/
[42]
{org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI}={riena.remote.protocol=hessian,
riena.remote.path=/WS_org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI,
riena.remote=true, service.id=1718}
Registered by bundle:
initial@reference:file:../../ekkehard/plugins/org.ekkehard.server_1.0.0.jar/
[42]
Bundles using service:
initial@reference:file:../../riena/plugins/org.eclipse.riena.communication.publisher_1.0.0.M3.jar/
[61]
----
My intention to use the ConfigAdmin was to avoid the second Service,
but if I understand you right this isn't possible
thanks again
ekke
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev
|