I have a request where I call one service and need to get result back. Which is
the best way to achive this?
So, I have:
A - B - A
I would also have to keep a state in service A and to merge it with response
from B. Where should I store my state?
Thank you in advance,
Milan
Hi Milan,
by state, you mean the current status of the service or the response
from the service ?
Do you use ServiceTracker ?
Regards
JB
On 08/13/2014 10:10 AM, Milan Tomic wrote:
I have a request where I call one service and need to get result back.
Which is the best way to achive this?
Hello JB
By the state I mean one object (a variable) that should be saved somewhere in
service A and merged with result from service B. Which is recommended way in
OSGi to store some key/value pairs?
I am not using ServiceTracker so far, but I am using events:
Event e = new
We are seeing the following message when deploying a WAR bundle and starting
karaf 3.0.1:
admin@NextGate () log4j:WARN No appenders could be found for logger
(org.springframework.web.servlet.DispatcherServlet).
log4j:WARN Please initialize the log4j system properly.
I was told to remove log4j
hi,
IN a loosely coupled system like this why wouldn't you make all the services
stateless and put the state into a context object in the event?
What leads you to use events rather than simply having A call a method on B?
There are some really good reasons to use an event driven architecture
If you want to use logging, you shouldn't contain those jars in your war
file.
Use Package-Import instead.
The Maven-Bundle-Plugin is your friend in helping to resolve those
dependencies.
regards, Achim
2014-08-13 17:33 GMT+02:00 asookazian2 asookaz...@gmail.com:
We are seeing the following
This works:
appender name=FILE class=org.apache.log4j.RollingFileAppender
layout class=org.apache.log4j.PatternLayout
/layout
/appender
This does *not* work (i.e. no logging of the same above contents in test.log
are visible in the
Achim, thx for reply! So I need to use Import-Package only instead of
Bundle-Classpath?
And if yes, which packages do I need to import specifically?
--
View this message in context:
http://karaf.922171.n3.nabble.com/No-appenders-could-be-found-for-logger-log4j-related-tp4034739p4034743.html
I don't know the answer to your question, but FWIW, I think most of the
participants here will not see your post because it is not being
disseminated via email. You need to subscribe to this forum so that your
post will be dispatched via email-digest.
--
View this message in context:
the following exception in the log. Please advise how to resolve.
Do I need to add log4j back to the bundle-classpath? thx.
20140813 10:01:03.662 [WARN ] FelixStartLevel |
138:org.ops4j.pax.web.pax-web-extender-war |
org.ops4j.pax.web.extender.war.internal.Activator | Error while destroying
So I added back the following to the Bundle-ClassPath section:
,WEB-INF/lib/log4j-1.2.16.jar
and still getting this exception on karaf startup. I still have the import
for org.apache.log4j in the Import-Package section so not sure what else
to try at this point
Caused by:
Not really the most correct answer, but try modifying your export section to
export everything.
That SHOULD work, I believe, because your project is using that JAR (thus,
it's contained inside of it) but you are not telling OSGI that you want to
use it and so it is blocking it from your JAR's
delete datasource-foo.xml from deploy and re-copy to deploy dir (with a
subsequent feature:install).
then do 'list' in karaf cmd line. I do not see the bundle id in the list
until i halt and restart karaf 3.0.1. is this intentional or a bug?
--
View this message in context:
First of all, if you want to have a working logging with Karaf, use the
logging provided by it.
Karaf uses Pax Logging which supports a wide range of logging frameworks.
So don't embed log4j in your bundles. It's not needed and just doesn't work
that way!
You also should check the way you do your
Thanks for the tip. I tried this and it did not work.
Still seeing exception in the karaf.log:
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.LogManager not
found by org.ops4j.pax.logging.pax-logging-api [7]
I will try to research the response that Achim gave. thx guys.
bane73
Hi guys,
sorry I was out for a rugby game ;)
Pax Logging wraps log4j, it doesn't import the whole log4j api.
Some part of the log4j API is not included because all doesn't make
sense in OSGi.
It's the case for org.apache.log4j.LogManager: it's part of log4j but
it's not included in
In the web.xml:
listener
listener-classorg.springframework.web.util.Log4jConfigListener/listener-class
/listener
Should we be using a different listener?
--
View this message in context:
Rugby, man that's tough! hope you're ok. ;)
http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-core/2.5.4/org/springframework/util/Log4jConfigurer.java
This class is using LogManager...
jbonofre wrote
Hi guys,
sorry I was out for a rugby game ;)
Pax Logging
I commented out the below listener block in the web.xml. Now it seems to be
behaving better (no exceptions) but I'm not sure what side-effect it may
have to remove that...
asookazian2 wrote
In the web.xml:
listener
listener-class
org.springframework.web.util.Log4jConfigListener
I'm a bit new to working with Karaf, but have set up locally a Karaf 3
installation (on Windows) and have developed an application consisting of a
number of OSGI bundles. So now I want to move what I have set up to test
and production tier servers. The thing is, these servers have no internet
20 matches
Mail list logo