fragment bundle support in maven-bundle-plugin

2010-08-19 Thread niiba...@gmail.com

 Greetings!

I wonder, when maven-bundle-plugin will support "Fragment-Host" 
attribute ininstructions? Is there any roadmap for this plugin?


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: fragment bundle support in maven-bundle-plugin

2010-08-19 Thread niiba...@gmail.com

 Using <_include> ?

On 19.08.2010 17:06, Justin Edelson wrote:

This works already.

On Aug 19, 2010, at 8:59 AM, "[email protected]"  wrote:


Greetings!

I wonder, when maven-bundle-plugin will support "Fragment-Host" attribute 
ininstructions? Is there any roadmap for this plugin?

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: fragment bundle support in maven-bundle-plugin

2010-08-19 Thread niiba...@gmail.com

 I've just tested this issue. It works! Thanks!

On 19.08.2010 17:21, Justin Edelson wrote:

No. Using Fragment-Host.

Maybe I'm misunderstanding your question.

On Aug 19, 2010, at 9:15 AM, "[email protected]"  wrote:


Using<_include>  ?

On 19.08.2010 17:06, Justin Edelson wrote:

This works already.

On Aug 19, 2010, at 8:59 AM, "[email protected]"   wrote:


Greetings!

I wonder, when maven-bundle-plugin will support "Fragment-Host" attribute 
ininstructions? Is there any roadmap for this plugin?

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: UPnP and OSGi R4 Compendium Bundle

2010-08-26 Thread niiba...@gmail.com

 Yes, it's possible, if you'll implement A/V Media Server specification.

On 26.08.2010 20:07, LongkerDandy wrote:

Hi
Just find out Felix now support UPnP, very excited.
I did some test, seems work well.

I have a question about the "OSGi R4 Compendium Bundle",
Which seems to be a dependency of UPnP base driver.

I've been using felix for a while but never seen a bundle need this,
I thought Felix is a implement of this.

Plus, the version I got from obr is  OSGi R4 Compendium Bundle 4.0.0;
It seems to be very old, there is a 4.1.0 version quite a while.

I tried to update it to 4.1.0, and seems also works.

So which one should I use?

PS:
I'm think to make a UPnP A/V Media Server with Felix UPnP bridge,
is that possible?



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Deploy bundles from OBR

2010-09-10 Thread niiba...@gmail.com

 Hello!

Is there any way to deploy some bundles from OBR at Felix startup? 
Something like obr:/-.


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Deploy bundles from OBR

2010-09-10 Thread niiba...@gmail.com

 Thank a lot!

On 10.09.2010 18:03, Richard S. Hall wrote:

 On 9/10/10 9:36, [email protected] wrote:

 Hello!

Is there any way to deploy some bundles from OBR at Felix startup? 
Something like obr:/-.


No, because the launcher installs the bundles before starting any of 
them, so the OBR bundle wouldn't be started yet to handle the obr: 
URL. Just create a bundle that you can provide some configuration in 
conf/config.properties to tell it which bundles it should deploy using 
OBR when it starts. This will achieve the same effect.


-> richard



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Transitive optional dependencies

2010-09-14 Thread niiba...@gmail.com

 Hello!

I have a bundle, which depends from jar, which included into current 
bundle using Embed-Dependency attribute with all dependencies.


But jar's pom.xml contains several dependencies with "optional=true". As 
a result, packages from those libraries placed into "Import-Package" 
attribute.


How I can exclude optional transitive dependencies from including into 
"Import-Package" attribute?


P.S. I've tried
*;scope=compile|runtime;optional=false
true
but it didn't help.

Thanks for your help.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Problem with embedded oprional dependencies

2010-09-16 Thread niiba...@gmail.com

 Hello!

I have a problem with with libraries, when i'm trying to embed them into 
my bundle using  instruction.

For example, I have a module A, which has dependency:


org.codehaus.groovy
groovy
1.7.0


It's not a bundle, so I'm trying to include it into my bundle "A":

*;optional=false;scope=compile|runtime
true
libs

If we look at groovy's pom, we'll see many dependencies, most of all 
have flag optional=true. One of these dependencies:


org.apache.ant
ant
1.7.1
compile
true



bsf
bsf
2.4.0
compile
true


commons-logging
commons-logging




When I generate a pom for my module I get "Import-Package" directive, 
which contains all packages from my bundle and included libraries, for 
example:


...org.apache.tools.ant.taskdefs,org.apache.tools.ant.types,org.apache.tools.ant.util,org.apache.bsf,org.apache.bsf.util...

and there is no resolution:="optional" or something like that.

I put a flag "optional=false", however, it has no effect to transitive 
dependencies.


1. Is there any way to include simple library (not bundle) into my 
bundle without excluding all transitive packages from my "import"?


2. Can bundle plugin set resolution:="optional" for those transitive 
dependencies, which are oprional in pom?


3. Maybe, I must use only wrapped libraries in dependencies, which 
already bundles? I don't want to deploy groovy like a bundle, because 
it's unnecessary to share it for all bundles, because it used only in 
one bundle.




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Problem with embedded oprional dependencies

2010-09-16 Thread niiba...@gmail.com
 It doesn't matter. Groovy is just an example. I'm trying to tell that 
if I'm trying to include library into bundle, all optional transitive 
dependencies become mandatory.


On 16.09.2010 14:38, Rémon. Sinnema wrote:


org.codehaus.groovy
groovy
1.7.0


It's not a bundle, so I'm trying to include it into my bundle "A":

The version at
http://dist.groovy.codehaus.org/distributions/groovy-binary-1.7.0.zip *is* an
OSGi bundle.




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Problem with embedded oprional dependencies

2010-09-16 Thread niiba...@gmail.com

 Yes, but I need some of them which are not optional

On 16.09.2010 18:18, hapa li wrote:

u can exclude the transitive dependencies in your pom.

On Thu, Sep 16, 2010 at 2:38 PM, [email protected]  wrote:

  It doesn't matter. Groovy is just an example. I'm trying to tell that if
I'm trying to include library into bundle, all optional transitive
dependencies become mandatory.

On 16.09.2010 14:38, Rémon. Sinnema wrote:


org.codehaus.groovy
groovy
1.7.0


It's not a bundle, so I'm trying to include it into my bundle "A":

The version at
http://dist.groovy.codehaus.org/distributions/groovy-binary-1.7.0.zip *is*
an
OSGi bundle.




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Export-Package and copying classes

2010-10-05 Thread niiba...@gmail.com

 Hello!

I have a problem with "Export-Package" directive.

I have a bundle, which contains package "groovy.lang". This package 
contains only one class, which I need to access protected method in 
class in groovy library.


I have another bundle "com.springsource.org.codehaus.groovy", which 
exports packages "groovy.lang, org.codehaus.groovy" and etc.


When I start maven-bundle-plugin, it adds classes from bundle 
"com.springsource.org.codehaus.groovy" from package "groovy.lang" to my 
bundle, because my bundle has this package to.


On the felix site I found example of such case:

 org.osgi.service.log

"Notice that the  instruction specifies that the bundle 
exports the Log Service package, even though this package is not 
contained in the bundle project. By declaring this, the plugin will copy 
the Log Service package into the resulting bundle JAR file. This is 
useful in this case because now the bundle can resolve without having to 
download the entire compendium bundle."


How I can prevent copying additional jar classes to my bundle? I need to 
import "groovy.lang" package into my bundle and merge it with my 
"groovy.lang" package so that the classes, which are not exist in my 
"groovy.lang" would be loaded from 
"com.springsource.org.codehaus.groovy", and classes, which exist in my 
"groovy.lang" package would be loaded from my bundle.


Re: Export-Package and copying classes

2010-10-05 Thread niiba...@gmail.com

 Thanks a lot for your explanation.

I'll try to get rid of my own class inside groovy.lang package.

On 06.10.2010 09:36, Felix Meschberger wrote:

Hi,

What you have here (and want to do) is a split-package situation, which
is bad style and prone to fail.

Thus, if your bundle exports groovy.lang, it should export the complete
groovy.lang. But probably this is a very bad idae because you don't have
the rest of the groovy bundle in your bundle.

In your case I would try to find a way to solve your problem other than
putting your own class into the groovy.lang package.

Regards
Felix


On 06.10.2010 06:58, [email protected] wrote:

  Hello!

I have a problem with "Export-Package" directive.

I have a bundle, which contains package "groovy.lang". This package
contains only one class, which I need to access protected method in
class in groovy library.

I have another bundle "com.springsource.org.codehaus.groovy", which
exports packages "groovy.lang, org.codehaus.groovy" and etc.

When I start maven-bundle-plugin, it adds classes from bundle
"com.springsource.org.codehaus.groovy" from package "groovy.lang" to my
bundle, because my bundle has this package to.

On the felix site I found example of such case:

  org.osgi.service.log

"Notice that the  instruction specifies that the bundle
exports the Log Service package, even though this package is not
contained in the bundle project. By declaring this, the plugin will copy
the Log Service package into the resulting bundle JAR file. This is
useful in this case because now the bundle can resolve without having to
download the entire compendium bundle."

How I can prevent copying additional jar classes to my bundle? I need to
import "groovy.lang" package into my bundle and merge it with my
"groovy.lang" package so that the classes, which are not exist in my
"groovy.lang" would be loaded from
"com.springsource.org.codehaus.groovy", and classes, which exist in my
"groovy.lang" package would be loaded from my bundle.


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Export-Package and copying classes

2010-10-06 Thread niiba...@gmail.com

 I see. But what's wrong with Require-Bundle?

On 06.10.2010 17:23, Richard S. Hall wrote:

On 10/6/10 1:58 AM, [email protected] wrote:

 Thanks a lot for your explanation.

I'll try to get rid of my own class inside groovy.lang package.


Yes, that would be the best approach. You cannot do what you are 
trying to do with Import-Package/Export-Package since they do not 
support split packages at all. You would either need to use 
Require-Bundle or Fragment-Host to use split packages, but I don't 
recommend either unless there is no other way.


-> richard



On 06.10.2010 09:36, Felix Meschberger wrote:

Hi,

What you have here (and want to do) is a split-package situation, which
is bad style and prone to fail.

Thus, if your bundle exports groovy.lang, it should export the complete
groovy.lang. But probably this is a very bad idae because you don't 
have

the rest of the groovy bundle in your bundle.

In your case I would try to find a way to solve your problem other than
putting your own class into the groovy.lang package.

Regards
Felix


On 06.10.2010 06:58, [email protected] wrote:

  Hello!

I have a problem with "Export-Package" directive.

I have a bundle, which contains package "groovy.lang". This package
contains only one class, which I need to access protected method in
class in groovy library.

I have another bundle "com.springsource.org.codehaus.groovy", which
exports packages "groovy.lang, org.codehaus.groovy" and etc.

When I start maven-bundle-plugin, it adds classes from bundle
"com.springsource.org.codehaus.groovy" from package "groovy.lang" 
to my

bundle, because my bundle has this package to.

On the felix site I found example of such case:

org.osgi.service.log

"Notice that the  instruction specifies that the 
bundle

exports the Log Service package, even though this package is not
contained in the bundle project. By declaring this, the plugin will 
copy

the Log Service package into the resulting bundle JAR file. This is
useful in this case because now the bundle can resolve without 
having to

download the entire compendium bundle."

How I can prevent copying additional jar classes to my bundle? I 
need to

import "groovy.lang" package into my bundle and merge it with my
"groovy.lang" package so that the classes, which are not exist in my
"groovy.lang" would be loaded from
"com.springsource.org.codehaus.groovy", and classes, which exist in my
"groovy.lang" package would be loaded from my bundle.


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Set System Property in felix configuration file

2010-10-07 Thread niiba...@gmail.com
 Put "system.properties" file into "conf" directory and put your system 
properties in that file.


On 07.10.2010 12:58, LongkerDandy wrote:

Hi

Did you mean just append to conf.properties will work?
I've tried that but not working.
I'll make a another try

Thanks
LongkerDandy

On Thu, Oct 7, 2010 at 3:18 PM, Hlusi, Jiri (NSN - FI/Tampere)<
[email protected]>  wrote:


Hello,

Yeps, it is possible.

Option 1:
  in config file in the/conf/config.properties

  To my understanding, can contain felix properties, properties of
  any other bundles as well as other types of system properties.


Option 2:
  during runtime using sysprop command from felix console (if you
  start the needed bundles - shell and shell-tui)

  ->  help sysprop
 Command : sysprop
 Usage   : sysprop [-r] [] []
 Description : Display, set, modify and remove system properties
  ->


Hopefully the above will be of help to you...

Best Regards,
Jiri


-Original Message-
From: ext LongkerDandy [mailto:[email protected]]
Sent: Thursday, October 07, 2010 5:53 AM
To: [email protected]
Subject: Set System Property in felix configuration file

Hi

Is that possible to set System Properties in felix configuration file or
somewhere else?

In a non-osgi environment, I can do it with a jvm argument, but I don't
know
how to do it in felix.

Regards
LongkerDandy



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Optional dependencies after update bundle

2010-11-30 Thread niiba...@gmail.com

 Hello everybody!

I have found some strange behavior and I need your opinion is this a bug 
or not.


For example, we have three bundles: A, B, C

"C" depends from "B"
"A" optionaly depends from "B"
"A" depends from "C"

I install "A" from local OBR. OBR detects that it need to install "B" 
and "C" too.

command for install: obr start "A" - for example.

After that I have "A", "B", "C" installed and in ACTIVE state.

Then I need o uninstall "C". I call uninstall 

When I uninstall "C" I call "refreshPackages()" and "B" became RESOLVED, 
but "A" is still in active state.


But when I install "C" again I get ClassNotFoundException, because "A" 
cannot resolve optional dependencies from "B". They lost after "B" 
became in RESOLVED state.


In details it looks like this:
C detects,that it need "A" and "B" in active state. "B" is in RESOLVED, 
"A" is in ACTIVE. "B" became in ACTIVE state, and "C" asks "A" for some 
classes. "A" need some classes from "B" through optional dependency, but 
it cannot find it, because wires are lost because of "optional" flag and 
when "B" became RESOLVED, "A" lost it's wires.


Spec says:
"Optional imports can be specified in the following ways:

. Dynamic Imports -- The DynamicImport-Package header is intended to
look for an exported package when that package is needed. The key use
case for dynamic import is the Class forName method when a bundle
does not know in advance the class name it may be requested to load.
. Resolution Directive -- The resolution directive on an import definition
specifying the value optional. A bundle may successfully resolve if a
suitable optional package is not present.

/The key difference between these two mechanisms is when the wires are
made. An attempt is made to establish a wire for a dynamic import every
time there is an attempt to load a class in that package, whereas the 
wire for

a resolution optional package may only be established when the bundle is
resolved./"

As I understand, bundle resolves optional dependencies only when it in 
RESOLVED state. Is that means, that for right restart of "C" bundle, I 
need to restart "A" and "B" too?


What is the right way when updating bundle?

Thank for your help.
With best regards, Vadim



Re: java.lang.reflect.Field.getValue() does not work in OSGi environment

2011-01-21 Thread niiba...@gmail.com

 Hello!

Do you have "Export-Package:  xs.personnel" in your bundle?

On 21.01.2011 11:46, Rice Yeh wrote:

Hi,
   I meet a problem that looks quite weird for me. I report it here to see
whether people have similar experience.

   In hibernate, there is a class
org.hibernate.property.DirectPropertyAccessor$DirectGetter, which is used to
directly access a field's value of a domain class. I find this function
fails in osgi environemt because java.lang.reflect.Field.getValue() throws
IllegalArgumentException, which never happen in non-osgi environment.  I
conjecture that this exception has something to do with classloaders. But I
cannot really figure it out.  The following is the exception trace.

caused by: java.lang.IllegalArgumentException: Can not set java.lang.Object
field as.classifier.Classifier.oid to xs.personnel.Citizen$Identity$Type
 at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
 at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
 at
sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
 at
sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
 at java.lang.reflect.Field.get(Field.java:358)
 at
org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:55)


Rice




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Deployment Admin implementation

2011-03-03 Thread niiba...@gmail.com

 Hello!

Is there any closest plans to implement Deployment Admin Spec. It seems 
that Eclipse Virgo already has a common ability (PAR's, Plans and 
Configurations). I'm interesting, if such functions will be implemented  
in Felix. It would be very useful to implement something like Plan in 
Virgo and use it with Repository Admin.


Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Deployment Admin implementation

2011-03-03 Thread niiba...@gmail.com

 Thanks for information.

When do you plan to make a release? Maybe I can help to make it faster? 
:) Close bugs, f.e.


On 03.03.2011 12:37, Felix Meschberger wrote:

Hi,

We in fact have an implementation already in Apache Felix:

   http://svn.apache.org/repos/asf/felix/trunk/deploymentadmin/

I don't think we have a release yet.

Regards
Felix

Am Donnerstag, den 03.03.2011, 09:11 + schrieb [email protected]:

Hello!

Is there any closest plans to implement Deployment Admin Spec. It seems
that Eclipse Virgo already has a common ability (PAR's, Plans and
Configurations). I'm interesting, if such functions will be implemented
in Felix. It would be very useful to implement something like Plan in
Virgo and use it with Repository Admin.

Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Deployment Admin implementation

2011-03-03 Thread niiba...@gmail.com
 That's cool, but my project is very tied to raw felix implementation. 
For example Felix is embedded in some places, because I need to make 
Splash screen and some other UI features during starting. Can I register 
custom startup hooks i Karaf?


On 03.03.2011 12:48, Guillaume Nodet wrote:

Closer to plans, I think we have Karaf features, see
   http://karaf.apache.org/manual/2.1.99-SNAPSHOT/users-guide/provisioning.html

On Thu, Mar 3, 2011 at 10:11, [email protected]  wrote:

  Hello!

Is there any closest plans to implement Deployment Admin Spec. It seems that
Eclipse Virgo already has a common ability (PAR's, Plans and
Configurations). I'm interesting, if such functions will be implemented  in
Felix. It would be very useful to implement something like Plan in Virgo and
use it with Repository Admin.

Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]








-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Deployment Admin implementation

2011-03-03 Thread niiba...@gmail.com
 I use "felix.systembundle.activators" property. Unfortunately, this 
property can be set only in runtime, because it contains list of 
"BundleActivator" instances. I've implemented custom felix runner where 
I put my system activator.


If Karaf allows somehow to hook default runner with custom system 
activator, It would be great!


On 03.03.2011 13:47, Guillaume Nodet wrote:

Maybe, how do you do that with Felix ?

On Thu, Mar 3, 2011 at 11:28, [email protected]  wrote:

  That's cool, but my project is very tied to raw felix implementation. For
example Felix is embedded in some places, because I need to make Splash
screen and some other UI features during starting. Can I register custom
startup hooks i Karaf?

On 03.03.2011 12:48, Guillaume Nodet wrote:

Closer to plans, I think we have Karaf features, see

http://karaf.apache.org/manual/2.1.99-SNAPSHOT/users-guide/provisioning.html

On Thu, Mar 3, 2011 at 10:11, [email protected]
  wrote:

  Hello!

Is there any closest plans to implement Deployment Admin Spec. It seems
that
Eclipse Virgo already has a common ability (PAR's, Plans and
Configurations). I'm interesting, if such functions will be implemented
  in
Felix. It would be very useful to implement something like Plan in Virgo
and
use it with Repository Admin.

Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]








-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Deployment Admin implementation

2011-03-03 Thread niiba...@gmail.com
 I don't need to embed it. I'd like to show splash when Karaf starts, 
if it is possible :)


On 03.03.2011 15:20, Guillaume Nodet wrote:

Karaf itself isn't really meant to be embedded, so the features stuff
can be reused outside karaf in an embedded Felix.

On Thu, Mar 3, 2011 at 11:28, [email protected]  wrote:

  That's cool, but my project is very tied to raw felix implementation. For
example Felix is embedded in some places, because I need to make Splash
screen and some other UI features during starting. Can I register custom
startup hooks i Karaf?

On 03.03.2011 12:48, Guillaume Nodet wrote:

Closer to plans, I think we have Karaf features, see

http://karaf.apache.org/manual/2.1.99-SNAPSHOT/users-guide/provisioning.html

On Thu, Mar 3, 2011 at 10:11, [email protected]
  wrote:

  Hello!

Is there any closest plans to implement Deployment Admin Spec. It seems
that
Eclipse Virgo already has a common ability (PAR's, Plans and
Configurations). I'm interesting, if such functions will be implemented
  in
Felix. It would be very useful to implement something like Plan in Virgo
and
use it with Repository Admin.

Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]








-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Deployment Admin implementation

2011-03-03 Thread niiba...@gmail.com

 Thanks a lot!

What is the default start level for custom bundles? I've found property 
karaf.systemBundlesStartLevel=50. Is that means that all bundles from 
"system" folder will start on 50th level?


On 03.03.2011 17:53, Guillaume Nodet wrote:

You could write a bundle and inside this bundle have an activator
displaying the splash window.
You can configure this bundle to be installed using
etc/startup.properties, just use a very low start level and it should
work.  It would not be tied to felix at all this way.

On Thu, Mar 3, 2011 at 15:33, [email protected]  wrote:

  I don't need to embed it. I'd like to show splash when Karaf starts, if it
is possible :)

On 03.03.2011 15:20, Guillaume Nodet wrote:

Karaf itself isn't really meant to be embedded, so the features stuff
can be reused outside karaf in an embedded Felix.

On Thu, Mar 3, 2011 at 11:28, [email protected]
  wrote:

  That's cool, but my project is very tied to raw felix implementation.
For
example Felix is embedded in some places, because I need to make Splash
screen and some other UI features during starting. Can I register custom
startup hooks i Karaf?

On 03.03.2011 12:48, Guillaume Nodet wrote:

Closer to plans, I think we have Karaf features, see


http://karaf.apache.org/manual/2.1.99-SNAPSHOT/users-guide/provisioning.html

On Thu, Mar 3, 2011 at 10:11, [email protected]
  wrote:

  Hello!

Is there any closest plans to implement Deployment Admin Spec. It seems
that
Eclipse Virgo already has a common ability (PAR's, Plans and
Configurations). I'm interesting, if such functions will be implemented
  in
Felix. It would be very useful to implement something like Plan in
Virgo
and
use it with Repository Admin.

Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]








-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Deployment Admin implementation

2011-03-03 Thread niiba...@gmail.com

 I've just checked it. It works. Thanks for help.

On 03.03.2011 17:53, Guillaume Nodet wrote:

You could write a bundle and inside this bundle have an activator
displaying the splash window.
You can configure this bundle to be installed using
etc/startup.properties, just use a very low start level and it should
work.  It would not be tied to felix at all this way.

On Thu, Mar 3, 2011 at 15:33, [email protected]  wrote:

  I don't need to embed it. I'd like to show splash when Karaf starts, if it
is possible :)

On 03.03.2011 15:20, Guillaume Nodet wrote:

Karaf itself isn't really meant to be embedded, so the features stuff
can be reused outside karaf in an embedded Felix.

On Thu, Mar 3, 2011 at 11:28, [email protected]
  wrote:

  That's cool, but my project is very tied to raw felix implementation.
For
example Felix is embedded in some places, because I need to make Splash
screen and some other UI features during starting. Can I register custom
startup hooks i Karaf?

On 03.03.2011 12:48, Guillaume Nodet wrote:

Closer to plans, I think we have Karaf features, see


http://karaf.apache.org/manual/2.1.99-SNAPSHOT/users-guide/provisioning.html

On Thu, Mar 3, 2011 at 10:11, [email protected]
  wrote:

  Hello!

Is there any closest plans to implement Deployment Admin Spec. It seems
that
Eclipse Virgo already has a common ability (PAR's, Plans and
Configurations). I'm interesting, if such functions will be implemented
  in
Felix. It would be very useful to implement something like Plan in
Virgo
and
use it with Repository Admin.

Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]








-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [ANN] OSGi in Action book

2011-03-28 Thread niiba...@gmail.com

 My congratulations! Amazing work!

On 29.03.2011 00:55, Richard S. Hall wrote:
Sorry, for the blatant advertising, but the OSGi book that Karl, 
Stuart, David, and I have been working on forever is finally done and 
available (in electronic form now and print within a week):


http://www.manning.com/hall/

-> richard

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: error management in OBR

2011-03-31 Thread niiba...@gmail.com

Hello!

What kind of errors have you got?

On 31.03.2011 13:09, Cédric Casenove wrote:

Hello,

I have a problem with the ResolverImpl.deploy() method. This method catches
errors but does not let me know anything bad happend because errors are not
thrown and there is no returned value.
Is there something planned (or already done) about that ?

Thanks,
Cedric



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Native library crash in OSGi

2011-05-18 Thread niiba...@gmail.com

Hello!

I wonder, is anybody tested such behavior:

We have one bundle with native library inside. Library throws, for 
example, "AccessViolation". Usually, when operation system catches such 
exception, it asks you to kill process. I wonder, what would be with 
felix? Whole instance will fail or only one bundle will fall and others 
continuous to work?


On my opinion, whole felix instance will fall down, because all bundles 
are running on the same jvm on the same process. Am I wrong?


I heard about "distributed osgi". Are there any work in this direction?

Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Native library crash in OSGi

2011-05-19 Thread niiba...@gmail.com

On 18.05.2011 19:19, Richard S. Hall wrote:

On 5/18/11 11:13, [email protected] wrote:

Hello!

I wonder, is anybody tested such behavior:

We have one bundle with native library inside. Library throws, for 
example, "AccessViolation". Usually, when operation system catches 
such exception, it asks you to kill process. I wonder, what would be 
with felix? Whole instance will fail or only one bundle will fall and 
others continuous to work?


On my opinion, whole felix instance will fall down, because all 
bundles are running on the same jvm on the same process. Am I wrong?


I would assume so too.



I heard about "distributed osgi". Are there any work in this direction?


Apache CXF has support for the OSGi Remote Services specification.


Thanks for advice, but it's very heavy for my task.



-> richard



Thanks.

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Native Lib on Vista (64bits) with JVM 1.6.0_26 64bits needs osname=win32

2011-06-21 Thread niiba...@gmail.com
According to 
http://msdn.microsoft.com/en-us/library/ms724832(v=vs.85).aspx 


you can define Windows Vista as

win32/foo32.dll;osname=Windows Vista;processor=x86-64,osversion=6.0


On 21.06.2011 14:22, Elvy wrote:

I'm on Windows Vista (which is 64 bits) and after switching from JVM 32bits
to JVM 64bits I had to use the following on my maven-bundle-plugin for my
app to properly load on Felix 3.0.8

__

win32/foo32.dll;osname=win32;processor=x86,
win64/foo64.dll;osname=win32;processor=x86-64,
linux/foo32.so;osname=linux;processor=x86,
linux64/foo64.so;osname=linux64;processor=x86-64

__


Look at the win64 declaration. Isn't it bizarre for the osname to be set as
win32 instead of win64?

Is this a bug or am I getting this wrong?

-
Tell me something you don't know!




Re: Help understanding OSGi class loading

2011-08-12 Thread niiba...@gmail.com

Hello!

I didn't understand clearly your task. Do you have one bundle with 
classes and another bundle with spring xml file?


On 12.08.2011 12:03, Jim Talbut wrote:

Hi,

I've just been surprised by the behaviour of karaf/felix and I'd be grateful 
for some help understanding how this works.

My code is split into two chunks:

1.   A compiled bundle.

2.   A Spring XML file.
My intention is that the Spring file contains all the configuration relating to 
the piece of work, whilst the bundle contains the (more static) compiled code - 
with the intention of being able to update/replace the Spring file whenever I 
want.

I just found an error in the bundle and uninstalled it, but the bundle created 
for the Spring file is still running.

Does this mean that only OSGi services are dynamically removed, and if the 
Spring file directly references exported classes from a bundle then the classes 
are only resolved via OSGi when they are loaded?
In which case will restarting the Spring bundle clear it out adequately to 
ensure that it picks up a new compiled bundle?

Thanks

Jim







-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Help understanding OSGi class loading

2011-08-15 Thread niiba...@gmail.com
Packages are resolved on "resolved" phase just after "install" phase. 
Framework creates "wires" between bundles using "Import" and "Export" 
packages directives.


When exporting bundle goes away, importing bundle still holds references 
to loaded classes until "update" or "refresh" will be called.


If you want to get more deeper into this process, you need to check 
"OSGi Core Specification" chapters

3.7 "Resolving process",
4.4.6.3 "Restoring State After Refresh or Update"
4.4.9 "Updating Bundles".



On 12.08.2011 14:11, Jim Talbut wrote:

Yes, though the spring bundle is just the single XML file loaded via the 
fileinstaller.

I think my question should be the same for any two bundles that relate purely 
by Import/Export packages:
At what point are the packages resolved?
What happens to that resolving when the Exporting bundle goes away?

Thanks

Jim

-Original Message-
From: [email protected] [mailto:[email protected]]
Sent: 12 August 2011 10:14
To: [email protected]
Subject: Re: Help understanding OSGi class loading

Hello!

I didn't understand clearly your task. Do you have one bundle with classes and 
another bundle with spring xml file?

On 12.08.2011 12:03, Jim Talbut wrote:

Hi,

I've just been surprised by the behaviour of karaf/felix and I'd be grateful 
for some help understanding how this works.

My code is split into two chunks:

1.   A compiled bundle.

2.   A Spring XML file.
My intention is that the Spring file contains all the configuration relating to 
the piece of work, whilst the bundle contains the (more static) compiled code - 
with the intention of being able to update/replace the Spring file whenever I 
want.

I just found an error in the bundle and uninstalled it, but the bundle created 
for the Spring file is still running.

Does this mean that only OSGi services are dynamically removed, and if the 
Spring file directly references exported classes from a bundle then the classes 
are only resolved via OSGi when they are loaded?
In which case will restarting the Spring bundle clear it out adequately to 
ensure that it picks up a new compiled bundle?

Thanks

Jim






-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Help understanding OSGi class loading

2011-08-16 Thread niiba...@gmail.com
Was the application context refreshed when you refreshed the xml bundle? 
Is there any logs after refresh?


On 16.08.2011 14:56, Jim Talbut wrote:

The xml-bundle does not contain code - but it does contain instructions that 
tell Spring to instantiate objects (and thus to load classes).

"it" is the xml-bundle.
The xml-bundle instructs spring/camel/cxf to set up a web service, when I call 
that web service I was getting the old implementation.

I refreshed both the xml bundle and the bundle containing the implementation 
and the web service was still getting the old implementation.
When the xml-bundle was uninstalled (by deleting the file) and reinstalled (by 
copying the same file back in place again) it picked up the new implementation.

Jim


-Original Message-
From: Per-Erik Svensson [mailto:[email protected]]
Sent: 16 August 2011 10:47
To: [email protected]
Subject: Re: Help understanding OSGi class loading

So, if the only things in the system are

osgi framework (felix)
fileinstall
some code bundle (spring bundle)
a bundle with an xml file only

And the xml-bundle imports packages that the spring-bundle exports, than updating and 
refreshing the spring-bundle should cause the xml-bundle to be "reloaded". 
However, if the xml-bundle does not contain code, why is it important that it gets it's 
package dependencies rewired? It will not load any classes anyway (and shouldn't have any 
package imports because it needs no packages)? I must be missing something of your 
problem. :)

If the xml-bundle however does contain code (and needs to load classes), are 
you sure that the only one exporting the packages of those classes is the 
spring-bundle. One possiblity is that you have other bundles in the system that 
export the same packages and that you're getting wired to those packages 
instead.

"It didn't pick up the new version of the classes until I deleted the Spring 
file[...]"
1. What is "it"? Which bundle are you expecting to see the changes from? If 
it's the xml-bundle, have you confirmed that it's manifest.mf-file states that it needs 
at least one package that ONLY the spring-bundle can give.
2. There is no way to unload classes, so if "it" has already loaded the classes 
it is using, it doesn't matter that you update the origin of those classes. You also need 
a refresh which will rewire the package dependencies, restart the dependent bundles, and 
reload the classes.
3. Have you made sure that the framework actually gets an update request on the 
spring bundle? Fileinstall only has the info supplied by the OS (file-size, 
file creation date and so on) to go on, and might determine that spring-bundleA 
and spring-bundleB are the same thing (no change, no update).

Finally, trying this in gogo shell might help you see what is wired to what and 
when updates actually happen!

Regards,
Per-Erik Svensson


On Tue, Aug 16, 2011 at 7:08 AM, Jim Talbut  wrote:


I've tried using refresh now (sorry it takes so long to get things
done around here) and it made no difference.
It didn't pick up the new version of the classes until I deleted the
Spring file, waited for fileinstall to pick that up and remove the
bundle, copied the file over again and waited for fileinstall to pick that up.
Note that this is using a 1.0-SNAPSHOT version of the classes so there
is no version number change, if that affects things.

Jim

-Original Message-
From: Jim Talbut [mailto:[email protected]]
Sent: 12 August 2011 17:32
To: [email protected]
Subject: RE: Help understanding OSGi class loading

No I didn't.
How does that work with existing instantiated objects?

Thanks

Jim

-Original Message-
From: Richard S. Hall [mailto:[email protected]]
Sent: 12 August 2011 14:44
To: [email protected]
Subject: Re: Help understanding OSGi class loading

Did you refresh after doing the update?

On 8/12/11 4:03 AM, Jim Talbut wrote:

Hi,

I've just been surprised by the behaviour of karaf/felix and I'd be

grateful for some help understanding how this works.

My code is split into two chunks:

1.   A compiled bundle.

2.   A Spring XML file.
My intention is that the Spring file contains all the configuration

relating to the piece of work, whilst the bundle contains the (more
static) compiled code - with the intention of being able to
update/replace the Spring file whenever I want.

I just found an error in the bundle and uninstalled it, but the
bundle

created for the Spring file is still running.

Does this mean that only OSGi services are dynamically removed, and
if

the Spring file directly references exported classes from a bundle
then the classes are only resolved via OSGi when they are loaded?

In which case will restarting the Spring bundle clear it out
adequately

to ensure that it picks up a new compiled bundle?

Thanks

Jim





-
To unsubscribe, e-mail: [email protected]
For add

Re: Help understanding OSGi class loading

2011-08-16 Thread niiba...@gmail.com
366 | 104 - org.apache.camel.camel-core
- 2.8.0 | Tracing is enabled on CamelContext:
mystuffUserdataLoadCamelContext
13:52:21,689 | INFO  | xtenderThread-26 | ReflectionServiceFactoryBean
| ory.ReflectionServiceFactoryBean  366 |  -  -  | Creating Service {
http://mycompany.com/esb/jobengines/client/service/mycompanySupportSystem/ClientSchedulerTarget}ClientSchedulerTargetServicefrom
 WSDL: resources/mystuffUserdataLoad/1.0.0/TaskSchedulerClient.wsdl
13:52:21,772 | INFO  | xtenderThread-26 | ServerImpl
| g.apache.cxf.endpoint.ServerImpl   93 |  -  -  | Setting the server's
publish address to be
http://0.0.0.0:8016/mystuffUserdataLoad/TaskSchedulerClient
13:52:22,099<http://0.0.0.0:8016/mystuffUserdataLoad/TaskSchedulerClient%0A13:52:22,099>|
 INFO  | xtenderThread-26 | log  |
.eclipse.jetty.util.log.Slf4jLog   55 | 51 - org.eclipse.jetty.util -
7.4.2.v20110526 | jetty-7.4.2.v20110526
13:52:22,111 | INFO  | xtenderThread-26 | log
  | .eclipse.jetty.util.log.Slf4jLog   55 | 51 - org.eclipse.jetty.util -
7.4.2.v20110526 | Started [email protected]:8016 STARTING
13:52:22,112 | INFO  | xtenderThread-26 | log
  | .eclipse.jetty.util.log.Slf4jLog   55 | 51 - org.eclipse.jetty.util -
7.4.2.v20110526 | started
o.e.j.s.h.ContextHandler{/mystuffUserdataLoad,null}
13:52:22,112 | INFO  | xtenderThread-26 | OsgiSpringCamelContext
| e.camel.impl.DefaultCamelContext 1906 | 104 - org.apache.camel.camel-core
- 2.8.0 | Route: RouteUserdataLoad started and consuming from:
Endpoint[cxf://bean:serviceSchedulerClient?dataFormat=POJO&synchronous=true]
13:52:22,115 | INFO  | xtenderThread-26 | OsgiSpringCamelContext
| e.camel.impl.DefaultCamelContext 1335 | 104 - org.apache.camel.camel-core
- 2.8.0 | Total 1 routes, of which 1 is started.
13:52:22,115 | INFO  | xtenderThread-26 | OsgiSpringCamelContext
| e.camel.impl.DefaultCamelContext 1336 | 104 - org.apache.camel.camel-core
- 2.8.0 | Apache Camel 2.8.0 (CamelContext: mystuffUserdataLoadCamelContext)
started in 0.582 seconds
13:52:22,116 | INFO  | xtenderThread-26 | OsgiBundleXmlApplicationContext
  | ractOsgiBundleApplicationContext  348 | 89 - org.springframework.context
- 3.0.5.RELEASE | Not publishing application context OSGi service for bundle
null (mystuffUserdataLoad)
13:52:22,117 | INFO  | xtenderThread-26 | ContextLoaderListener
  | BundleApplicationContextListener   45 | 94 -
org.springframework.osgi.extender - 1.2.1 | Application context successfully
refreshed (OsgiBundleXmlApplicationContext(bundle=mystuffUserdataLoad,
config=osgibundle:/META-INF/spring/*.xml))


-Original Message-
From: [email protected] [mailto:[email protected]]
Sent: 16 August 2011 12:04
To: [email protected]
Subject: Re: Help understanding OSGi class loading

Was the application context refreshed when you refreshed the xml bundle?
Is there any logs after refresh?

On 16.08.2011 14:56, Jim Talbut wrote:

The xml-bundle does not contain code - but it does contain instructions

that tell Spring to instantiate objects (and thus to load classes).

"it" is the xml-bundle.
The xml-bundle instructs spring/camel/cxf to set up a web service, when

I call that web service I was getting the old implementation.

I refreshed both the xml bundle and the bundle containing the

implementation and the web service was still getting the old implementation.

When the xml-bundle was uninstalled (by deleting the file) and

reinstalled (by copying the same file back in place again) it picked up the
new implementation.

Jim


-Original Message-
From: Per-Erik Svensson [mailto:[email protected]]
Sent: 16 August 2011 10:47
To: [email protected]
Subject: Re: Help understanding OSGi class loading

So, if the only things in the system are

osgi framework (felix)
fileinstall
some code bundle (spring bundle)
a bundle with an xml file only

And the xml-bundle imports packages that the spring-bundle exports,
than updating and refreshing the spring-bundle should cause the
xml-bundle to be "reloaded". However, if the xml-bundle does not
contain code, why is it important that it gets it's package
dependencies rewired? It will not load any classes anyway (and
shouldn't have any package imports because it needs no packages)? I
must be missing something of your problem. :)

If the xml-bundle however does contain code (and needs to load classes),

are you sure that the only one exporting the packages of those classes is
the spring-bundle. One possiblity is that you have other bundles in the
system that export the same packages and that you're getting wired to those
packages instead.

"It didn't pick up the new version of the classes until I deleted the

Spring file[...]"

1. What is "it"? Which bundle are you expecting to see the changes from?

If it's the xml-bundle, have you confirmed that it's manifest.mf-file states
that it needs at least one package that ONLY the spring-bundle ca

Re: How to configure Apache Felix File Install with Netbeans?

2012-06-07 Thread niiba...@gmail.com
It's impossible to configure File Install or any other Felix projects in 
Netbeans. Almost all projects are configured due felix configuration 
file. When Netbeans starts felix, it uses default configuration file, 
which is located into felix.jar.
You have to wait while Netigso module will be rewritten with support of 
custom felix configuration file or rewrite it yourself for your project.


Regards.

On 06/07/2012 04:16 PM, Felix Meschberger wrote:

Hi,

Am 07.06.2012 um 13:23 schrieb Peter Penzov:


Hi,
  I downloaded Apache Felix FIle Install. I want to configure it to auto
deploy bundles from the directory /opt/bundles. I found several tutorials
how to configure it with Eclipse but I don't find information how I can do
this with Netbeans. Would you give me more information?

Not sure, whether this is special to Netbeans or Eclipse. But essentially I 
would say, you just configure the appropriate property to have FileInstall read 
from said folder and be done.

Regards
Felix
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]