> On Mar 7, 2022, at 7:27 AM, Jonathan Gallimore <[email protected]> 
> wrote:
> 
> Currently looking at how to add a unit test. Essentially, making two calls
> to a remote EJB should both come from the same source port. The http
> connection unit tests in openejb-client don't seem to pass through the
> Client class as far as I can tell, and I'm not sure there's enough
> contextual information available if I deploy a EJB in an Arquillian test
> and call it remotely. If you have any thoughts let me know - I'll keep
> plugging away at it.

One approach could be to setup the access log on the server-side so that it 
logs the details needed, then use the server-composer to create/launch a 
separate TomEE process where you can make EJB calls.  Once you've made all the 
EJB calls you like, read and parse the access log to ensure all the calls to 
the `/tomee/ejb` path came from the same client host/port.

Something like that would need to go into the itests as it depends on a TomEE 
tar.gz.  Here's a test I wrote recently that uses the server-composer (which 
should look familiar):

 - 
https://github.com/apache/tomee/blob/master/itests/jaxrs/src/test/java/org/apache/tomee/itests/jaxrs/applogging/ApplicationLoggingTest.java#L40-L48


-David

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to