Quantcast

Connect Event

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Connect Event

Zack Manning

Hey All,

 

Not sure if this list is active anymore, but I am having trouble using monitoring probes to meter connect events through Grizzly.  On my connection probe I get ACCEPT, READ, and WRITE events, but no CONNECTED, or CLOSE.  Is there a secret to getting these events to show up? 

 

This is inside a test utilizing a vanilla Jersey setup with an empty resource returning a simple constant.  Any pointers there would be much appreciated!

 

Zack

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Connect Event

Ryan Lubke-2
ConnectionProbe.onConnectEvent() is relevant to the client side only. 

The close event should be invoked.  If you don't mind sharing your test case, we can take a closer look to see why it's not.

March 8, 2017 at 16:02

Hey All,

 

Not sure if this list is active anymore, but I am having trouble using monitoring probes to meter connect events through Grizzly.  On my connection probe I get ACCEPT, READ, and WRITE events, but no CONNECTED, or CLOSE.  Is there a secret to getting these events to show up? 

 

This is inside a test utilizing a vanilla Jersey setup with an empty resource returning a simple constant.  Any pointers there would be much appreciated!

 

Zack


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Connect Event

Zack Manning

Hey Ryan,

 

I’m adding probes through the Jersey/Grizzly server setup:

 

HttpServer server = GrizzlyHttpServerFactory.createHttpServer(…)

server.getConnectionConfig().addProbes(<my probe>)

 

I implement org.glassfish.grizzly.ConnectionProbe.Adapter and log on all events.  On a basic request I get:

 

* IOEventReady SERVER_ACCEPT

* AcceptEvent

* IOEventReady READ

* IOEventDisable READ

* ReadEvent

* WriteEvent

* IOEventEnable READ

 

My client code uses the Jersey client API:

 

        Client client = ClientBuilder.newClient(new ClientConfig());

 

        Response response = client.target(<my uri>)

            .path("/thing")

            .request()

            .get();

 

        response.close(); //just here to make sure we’re closing

 

Thanks for the help!

 

Zack

 

P.S. Ken Paulsen says hi

 

From: Ryan Lubke <[hidden email]>
Organization: Oracle Corporation
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, March 8, 2017 at 4:52 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Connect Event

 

ConnectionProbe.onConnectEvent() is relevant to the client side only. 

The close event should be invoked.  If you don't mind sharing your test case, we can take a closer look to see why it's not.


March 8, 2017 at 16:02

Hey All,

 

Not sure if this list is active anymore, but I am having trouble using monitoring probes to meter connect events through Grizzly.  On my connection probe I get ACCEPT, READ, and WRITE events, but no CONNECTED, or CLOSE.  Is there a secret to getting these events to show up? 

 

This is inside a test utilizing a vanilla Jersey setup with an empty resource returning a simple constant.  Any pointers there would be much appreciated!

 

Zack

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Connect Event

Ryan Lubke-2
If the call to createHttpServer() is passing true to the GrizzlyHttpServerFactory.createHttpServer() call, then the probes added *after* the
server has been started are effectively ignored.

You can obtain the listener from a running server instance, stop and restart it to achieve the same effect.

Pass on my regards to Ken.


March 8, 2017 at 18:21

Hey Ryan,

 

I’m adding probes through the Jersey/Grizzly server setup:

 

HttpServer server = GrizzlyHttpServerFactory.createHttpServer(…)

server.getConnectionConfig().addProbes(<my probe>)

 

I implement org.glassfish.grizzly.ConnectionProbe.Adapter and log on all events.  On a basic request I get:

 

* IOEventReady SERVER_ACCEPT

* AcceptEvent

* IOEventReady READ

* IOEventDisable READ

* ReadEvent

* WriteEvent

* IOEventEnable READ

 

My client code uses the Jersey client API:

 

        Client client = ClientBuilder.newClient(new ClientConfig());

 

        Response response = client.target(<my uri>)

            .path("/thing")

            .request()

            .get();

 

        response.close(); //just here to make sure we’re closing

 

Thanks for the help!

 

Zack

 

P.S. Ken Paulsen says hi

 

From: Ryan Lubke [hidden email]
Organization: Oracle Corporation
Reply-To: [hidden email] [hidden email]
Date: Wednesday, March 8, 2017 at 4:52 PM
To: [hidden email] [hidden email]
Subject: Re: Connect Event

 

ConnectionProbe.onConnectEvent() is relevant to the client side only. 

The close event should be invoked.  If you don't mind sharing your test case, we can take a closer look to see why it's not.


 

March 8, 2017 at 16:52
ConnectionProbe.onConnectEvent() is relevant to the client side only. 

The close event should be invoked.  If you don't mind sharing your test case, we can take a closer look to see why it's not.


March 8, 2017 at 16:02

Hey All,

 

Not sure if this list is active anymore, but I am having trouble using monitoring probes to meter connect events through Grizzly.  On my connection probe I get ACCEPT, READ, and WRITE events, but no CONNECTED, or CLOSE.  Is there a secret to getting these events to show up? 

 

This is inside a test utilizing a vanilla Jersey setup with an empty resource returning a simple constant.  Any pointers there would be much appreciated!

 

Zack


Loading...