Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » serverside OSGI follow on questions
serverside OSGI follow on questions [message #59300] Thu, 02 February 2006 01:09 Go to next message
Jim DAnjou is currently offline Jim DAnjouFriend
Messages: 25
Registered: July 2009
Junior Member
I have had a little more experience running serverside OSGI. I have some
questions that have come up.

1. Enabling log4j. Our code uses log4j. log4j used to discover our
log4.properties file in the classloader path of the web container and
implicitly use them. That is no longer happening. log4j reports that it
can't find any appenders (defined in log4.properties). I have to
explicitly enable log4j to get it to work. I have tried putting our
log4j.properties file in various places in the deployed WAR's directory
structure to no avail.

2. It would be cool to have support for a links directory (under
/platform) so contributing features could be deployed away from the core
eclipse/osgi feature-plugin set. I might just mean including one or more
existing plug-in jars.

3. Do you have any recommendations/tooling for publishing to the server?
Right now I am manually exporting a deployable feature to the /platform
directory to prime it and then exporting modified project(s) as
deployable plug-in(s) as I make changes. Running a sp_redeploy after each
export to restart my app. Some automation via ANT and PDE would probably
improve this.

Thanks,
Jim D'Anjou
Re: serverside OSGI follow on questions [message #59325 is a reply to message #59300] Thu, 02 February 2006 07:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: skaegi.sympatico.ca

> 1. Enabling log4j. Our code uses log4j. log4j used to discover our
> log4.properties file in the classloader path of the web container and
> implicitly use them. That is no longer happening. log4j reports that it
> can't find any appenders (defined in log4.properties). I have to
> explicitly enable log4j to get it to work. I have tried putting our
> log4j.properties file in various places in the deployed WAR's directory
> structure to no avail.
Hmm... is your log4j in a bundle? If so, your log4j.properties needs to be
on that bundle's classpath.
If on the otherhand you have log4j.jar in web-inf/lib things should work as
before.
Let me know if you run into problems and I'll try it out.

> 2. It would be cool to have support for a links directory (under
> /platform) so contributing features could be deployed away from the core
> eclipse/osgi feature-plugin set. I might just mean including one or more
> existing plug-in jars.
hmm...
It's a little tricky because link support comes from platform.xml. (see the
context.tempdir's platform/configuration/org.eclipse.update/platform.xml)
If you want you can directly add a transient="true" to the config element
and experiment.
I'd like to wait and see what happens with the "simple" configrator that's
supposed to be coming.
Open an EHR if you like.

>
> 3. Do you have any recommendations/tooling for publishing to the server?
> Right now I am manually exporting a deployable feature to the /platform
> directory to prime it and then exporting modified project(s) as
> deployable plug-in(s) as I make changes. Running a sp_redeploy after each
> export to restart my app. Some automation via ANT and PDE would probably
> improve this.
:) I've done the same thing countless times. e.g. exporting features and
plugins to the platform dir.
Automation of that process would be nice ... in fact codifying that process
in documentation would be helpful

>
> Thanks,
> Jim D'Anjou
>
>
Re: serverside OSGI follow on questions [message #59374 is a reply to message #59325] Thu, 02 February 2006 07:47 Go to previous messageGo to next message
Peter Neubauer is currently offline Peter NeubauerFriend
Messages: 7
Registered: July 2009
Junior Member
Hi Simon,
Simon Kaegi wrote:

>>1. Enabling log4j. Our code uses log4j. log4j used to discover our
>>log4.properties file in the classloader path of the web container and
>>implicitly use them. That is no longer happening. log4j reports that it
>>can't find any appenders (defined in log4.properties). I have to
>>explicitly enable log4j to get it to work. I have tried putting our
>>log4j.properties file in various places in the deployed WAR's directory
>>structure to no avail.
You might want ot be interested in the Logging bundle over at
http://wiki.ops4j.org/dokuwiki/doku.php?id=pax:logging which lets you
use log4j API but uses OSGi logging and configuration for it.

/peter
Re: serverside OSGI, links support [message #59398 is a reply to message #59374] Thu, 02 February 2006 11:01 Go to previous messageGo to next message
Wolfgang Gehner is currently offline Wolfgang GehnerFriend
Messages: 26
Registered: July 2009
Junior Member
Jim,

I hacked some "links" support in the sample webapp demo referred available
via my article at http://www.infonoia.com/en/content.jsp?d=inf.05.07

It adds stuff in the linked directory to the deployed app during
/sp_redeploy.

Let me know if you have questions.

Rgds,
Wolfgang Gehner
Re: serverside OSGI follow on questions [message #59705 is a reply to message #59374] Thu, 02 February 2006 09:46 Go to previous messageGo to next message
Wolfgang Gehner is currently offline Wolfgang GehnerFriend
Messages: 26
Registered: July 2009
Junior Member
Jim,

I hacked some "links" support in the sample webapp demo referred to in my
article at
http://www.infonoia.com/en/content.jsp?d=inf.05.07
It adds stuff in the linked directory to the deployed app during
/sp_redeploy.

Let me know if you have questions.

Rgds,
Wolfgang Gehner
"Jim D'Anjou" <danjou@us.ibm.com> schrieb im Newsbeitrag
news:c33d033fc5d4dbb65445408d0e7a2d1b$1@www.eclipse.org...
>I have had a little more experience running serverside OSGI. I have some
>questions that have come up.
>
> 1. Enabling log4j. Our code uses log4j. log4j used to discover our
> log4.properties file in the classloader path of the web container and
> implicitly use them. That is no longer happening. log4j reports that it
> can't find any appenders (defined in log4.properties). I have to
> explicitly enable log4j to get it to work. I have tried putting our
> log4j.properties file in various places in the deployed WAR's directory
> structure to no avail.
>
> 2. It would be cool to have support for a links directory (under
> /platform) so contributing features could be deployed away from the core
> eclipse/osgi feature-plugin set. I might just mean including one or more
> existing plug-in jars.
>
> 3. Do you have any recommendations/tooling for publishing to the server?
> Right now I am manually exporting a deployable feature to the /platform
> directory to prime it and then exporting modified project(s) as
> deployable plug-in(s) as I make changes. Running a sp_redeploy after each
> export to restart my app. Some automation via ANT and PDE would probably
> improve this.
>
> Thanks,
> Jim D'Anjou
>
>
Re: serverside OSGI follow on questions [message #60922 is a reply to message #59325] Thu, 09 February 2006 16:59 Go to previous message
Eclipse UserFriend
Originally posted by: jeff_nospam_mcaffer.ca.ibm.com

"Simon Kaegi" <skaegi@sympatico.ca> wrote in message
news:drsc1a$vp7$1@utils.eclipse.org...
> > 1. Enabling log4j. Our code uses log4j. log4j used to discover our
> > log4.properties file in the classloader path of the web container and
> > implicitly use them. That is no longer happening. log4j reports that it
> > can't find any appenders (defined in log4.properties). I have to
> > explicitly enable log4j to get it to work. I have tried putting our
> > log4j.properties file in various places in the deployed WAR's directory
> > structure to no avail.
> Hmm... is your log4j in a bundle? If so, your log4j.properties needs to be
> on that bundle's classpath.
> If on the otherhand you have log4j.jar in web-inf/lib things should work
as
> before.
> Let me know if you run into problems and I'll try it out.

You may also end up with problems finding appenders due to log4j's use of
context classloaders. You should consider buddy loading to get this
working. Its covered in Chapter 20 of the RCP book (http://eclipsercp.org)
and in some of the Eclipse help.

> > 2. It would be cool to have support for a links directory (under
> > /platform) so contributing features could be deployed away from the core
> > eclipse/osgi feature-plugin set. I might just mean including one or more
> > existing plug-in jars.
> hmm...
> It's a little tricky because link support comes from platform.xml. (see
the
> context.tempdir's platform/configuration/org.eclipse.update/platform.xml)
> If you want you can directly add a transient="true" to the config element
> and experiment.
> I'd like to wait and see what happens with the "simple" configrator that's
> supposed to be coming.
> Open an EHR if you like.

FYI, the simple configurator is not likely to happen in 3.2. We were not
getting enough bang for the buck as the changes started rippling. Instead
we are looking at some helper api for managing platform.xml and specifying
start information.

> > 3. Do you have any recommendations/tooling for publishing to the server?
> > Right now I am manually exporting a deployable feature to the /platform
> > directory to prime it and then exporting modified project(s) as
> > deployable plug-in(s) as I make changes. Running a sp_redeploy after
each
> > export to restart my app. Some automation via ANT and PDE would probably
> > improve this.
> :) I've done the same thing countless times. e.g. exporting features and
> plugins to the platform dir.
> Automation of that process would be nice ... in fact codifying that
process
> in documentation would be helpful

Yes!! There is an Equinox wiki (http://wiki.eclipse.org/index.php/Equinox)
that would be great for this.

Jeff
Previous Topic:Problems running Equinox on Sharp Zaurus
Next Topic:Framework extension bundles and inner-bundle jars
Goto Forum:
  


Current Time: Thu Dec 26 13:00:45 GMT 2024

Powered by FUDForum. Page generated in 0.03934 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top