EJB and client in same EAP run in same thread

Latest response

I have an EJB in an EAR deployed in a JBoss EAP instannce. I also have a client for the EJB deployed in the same instance in a WAR that is not in an EAR.

I want the EJB to log to its own log files and the client to log to its log files. But what happens is the client logs to its log file until the EJB is called then all the logging for both the client and the EJB go into the EJBs log files.

How can I make this work?

Responses

Assuming you're using JBoss EAP 6.x take a look at the following Knowledge Base Article [1].

Thanks
Mustafa

[1] https://access.redhat.com/solutions/105653

Yes, I am using EAP 6.x. But that did not seem to help.
I have two deployed artifacts: a.war and b.ear. b.ear contains ejb.jar
a.war has a client that calls the ejb in b.ear.
When the client runs it logs info into a.war.log.
When the ejb starts to run it logs info into b.ear.log
But from that time on any logging by the client is now logged into b.ear.log.

I think you may be better of raising a support case for this. It sounds like it's working like it should.

When the client runs it logs info into a.war.log.
When the ejb starts to run it logs info into b.ear.log

This is the expected outcome right based on your packaging.

But from that time on any logging by the client is now logged into b.ear.log.

Do you mean the next time you run the client, it's logging now goes to the b.ear.log? If so raise a case, it sounds like your clients logger is somehow getting switched to the b.ear appender or something.

Mus

Yep, that's what happens. I'll open a case and see what they say.

Thanks for your help!

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.