ApacheCon is now less than a month away!

2016-10-19 Thread Rich Bowen
Dear Apache Enthusiast,

ApacheCon Sevilla is now less than a month out, and we need your help
getting the word out. Please tell your colleagues, your friends, and
members of related technical communities, about this event. Rates go up
November 3rd, so register today!

ApacheCon, and Apache Big Data, are the official gatherings of the
Apache Software Foundation, and one of the best places in the world to
meet other members of your project community, gain deeper knowledge
about your favorite Apache projects, learn about the ASF. Your project
doesn't live in a vacuum - it's part of a larger family of projects that
have a shared set of values, as well as a shared governance model. And
many of our project have an overlap in developers, in communities, and
in subject matter, making ApacheCon a great place for cross-pollination
of ideas and of communities.

Some highlights of these events will be:

* Many of our board members and project chairs will be present
* The lightning talks are a great place to hear, and give, short
presentations about what you and other members of the community are
working on
* The key signing gets you linked into the web of trust, and better
able to verify our software releases
* Evening receptions and parties where you can meet community
members in a less formal setting
* The State of the Feather, where you can learn what the ASF has
done in the last year, and what's coming next year
* BarCampApache, an informal unconference-style event, is another
venue for discussing your projects at the ASF

We have a great schedule lined up, covering the wide range of ASF
projects, including:

* CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos -
Carlos Sanchez
* Inner sourcing 101 - Jim Jagielski
* Java Memory Leaks in Modular Environments - Mark Thomas

ApacheCon/Apache Big Data will be held in Sevilla, Spain, at the Melia
Sevilla, November 14th through 18th. You can find out more at
http://apachecon.com/  Other ways to stay up to date with ApacheCon are:

* Follow us on Twitter at @apachecon
* Join us on IRC, at #apachecon on the Freenode IRC network
* Join the apachecon-discuss mailing list by sending email to
apachecon-discuss-subscr...@apache.org
* Or contact me directly at rbo...@apache.org with questions,
comments, or to volunteer to help

See you in Sevilla!

-- 
Rich Bowen: VP, Conferences
rbo...@apache.org
http://apachecon.com/
@apachecon

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: Felix/CM/DS mystery

2016-10-19 Thread Benson Margulies
I said I'd be quiet unless I found an explanation -- and I did.
Removing this, which was a leftover from a bigger bad idea, did the
job.


   org.osgi
   osgi.cmpn
   test


-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: how can a bundle stop itself programmatically?

2016-10-19 Thread Raymond Auge
I was thinking, and would suggest, exactly the same thing as Neil!

Sincerely,
- Ray

On Wed, Oct 19, 2016 at 7:04 AM, Neil Bartlett  wrote:

> Change the logic of the update… instead of always replacing the
> security.policy file, replace it only if it is not already in the required
> state. This makes your bundle idempotent (it doesn’t matter how many times
> it is called) which is a much more robust approach.
>
> Neil
>
> > On 19 Oct 2016, at 07:05, sid19039  wrote:
> >
> > Hello Ray,
> >
> > Thanks for your reply. Following is our use case:
> >
> > we are making a bundle which would be used as a security patch meant to
> > update a security.policy file.
> > Now the scenario is that we are deploying that bundle on to a felix
> > framework target via Apache Ace server. For the very first time when it
> > starts, it updates the file - which is ok. But Apache Ace server
> refreshes
> > the felix framework i.e it restarts all of the bundles installed
> previously
> > also each time some new bundle is deployed onto the target. Due to which
> our
> > security bundle also restarts and update security.policy file again
> which is
> > not required. So we want it(the bundle) to be removed from the framework
> > once it updates the file or simply runs only once until somebody tries to
> > update the file by deploying its new version.
> >
> > Any suggestions would be very helpful.
> >
> > Regards
> > Siddharth
> >
> >
> >
> > --
> > View this message in context: http://apache-felix.18485.x6.
> nabble.com/how-can-a-bundle-stop-itself-programmatically-
> tp5018885p5018894.html
> > Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> > For additional commands, e-mail: users-h...@felix.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>


-- 
*Raymond Augé* 
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* 
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance  (@OSGiAlliance)


Re: how can a bundle stop itself programmatically?

2016-10-19 Thread Neil Bartlett
Change the logic of the update… instead of always replacing the security.policy 
file, replace it only if it is not already in the required state. This makes 
your bundle idempotent (it doesn’t matter how many times it is called) which is 
a much more robust approach.

Neil

> On 19 Oct 2016, at 07:05, sid19039  wrote:
> 
> Hello Ray,
> 
> Thanks for your reply. Following is our use case:
> 
> we are making a bundle which would be used as a security patch meant to
> update a security.policy file.
> Now the scenario is that we are deploying that bundle on to a felix
> framework target via Apache Ace server. For the very first time when it
> starts, it updates the file - which is ok. But Apache Ace server refreshes
> the felix framework i.e it restarts all of the bundles installed previously
> also each time some new bundle is deployed onto the target. Due to which our
> security bundle also restarts and update security.policy file again which is
> not required. So we want it(the bundle) to be removed from the framework
> once it updates the file or simply runs only once until somebody tries to
> update the file by deploying its new version.
> 
> Any suggestions would be very helpful.
> 
> Regards
> Siddharth
> 
> 
> 
> --
> View this message in context: 
> http://apache-felix.18485.x6.nabble.com/how-can-a-bundle-stop-itself-programmatically-tp5018885p5018894.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: how can a bundle stop itself programmatically?

2016-10-19 Thread Karel Haeck


or simpler throw new RuntimeException();

from the spec:

 If the start(BundleContext) method throws an exception, the Framework 
must mark the
bundle as stopped and send out STOPPING and STOPPED events but it must 
not call the Bundle
Activator stop(BundleContext) method. The start method must therefore be 
careful to clean up

any resources it creates in the start method when it throws an exception.

On 19/10/2016 12:51, Guillaume Nodet wrote:

Try stopping / removing the bundle in another thread.

new Thread(new Runnable() {
 final Bundle bundle = bundleContext.getBundle();
 @Override
 public void run() {
 bundle.stop();
 }
}).start();


2016-10-18 14:35 GMT+02:00 sid19039 :


Hello All,

I have trying to stop a bundle from within itself by invoking stop method
as
following in its Activator's start method:
bundleContext.getBundle().stop();

But post this statement is executed, when i check its state via "lb"
command
on  felix shell, its state is shown as Active.
Then when i try to stop it via stop  command, an exception is
thrown that
*org.osgi.framework.BundleException: Stopping a starting or stopping
bundle
is currently not supported.*And then its state is shown as *stopping*

Please someone tell how i can achieve this..

Regards
Siddharth




--
View this message in context: http://apache-felix.18485.x6.
nabble.com/how-can-a-bundle-stop-itself-programmatically-tp5018885.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: how can a bundle stop itself programmatically?

2016-10-19 Thread Guillaume Nodet
Try stopping / removing the bundle in another thread.

new Thread(new Runnable() {
final Bundle bundle = bundleContext.getBundle();
@Override
public void run() {
bundle.stop();
}
}).start();


2016-10-18 14:35 GMT+02:00 sid19039 :

> Hello All,
>
> I have trying to stop a bundle from within itself by invoking stop method
> as
> following in its Activator's start method:
> bundleContext.getBundle().stop();
>
> But post this statement is executed, when i check its state via "lb"
> command
> on  felix shell, its state is shown as Active.
> Then when i try to stop it via stop  command, an exception is
> thrown that
> *org.osgi.framework.BundleException: Stopping a starting or stopping
> bundle
> is currently not supported.*And then its state is shown as *stopping*
>
> Please someone tell how i can achieve this..
>
> Regards
> Siddharth
>
>
>
>
> --
> View this message in context: http://apache-felix.18485.x6.
> nabble.com/how-can-a-bundle-stop-itself-programmatically-tp5018885.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>


-- 

Guillaume Nodet

Red Hat, Open Source Integration

Email: gno...@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/


Re: how can a bundle stop itself programmatically?

2016-10-19 Thread sid19039
Hello Ray,

Thanks for your reply. Following is our use case:

we are making a bundle which would be used as a security patch meant to
update a security.policy file.
Now the scenario is that we are deploying that bundle on to a felix
framework target via Apache Ace server. For the very first time when it
starts, it updates the file - which is ok. But Apache Ace server refreshes
the felix framework i.e it restarts all of the bundles installed previously
also each time some new bundle is deployed onto the target. Due to which our
security bundle also restarts and update security.policy file again which is
not required. So we want it(the bundle) to be removed from the framework
once it updates the file or simply runs only once until somebody tries to
update the file by deploying its new version.

Any suggestions would be very helpful.

Regards
Siddharth



--
View this message in context: 
http://apache-felix.18485.x6.nabble.com/how-can-a-bundle-stop-itself-programmatically-tp5018885p5018894.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org