Skip to main content

How to create a connector-connection-pool in Glassfish with REST interface

No replies
Joined: 2013-01-28

For a remote administration of multible Glassfish instances I want to configure resource adapter connection pool and connector resources. These configuration can only be done after the resource adapter deployment.

All works if I do things with asadmin.

Get Access via REST works as aspected.

curl --user admin:pwd -X GET -H "Accept: application/JSON"

Now I want to create following command doing a REST call

asadmin create-connector-connection-pool --raname MulticastDNS-connector
--connectiondefinition multicastdns.outbound.MulticastDNSRegistry multicastdns/pool

I followed some of the Orcale examples or
But for all things I tried I got 400 Bad Request.

curl --user admin:pwd -X POST -H "Accept: application/JSON" -H "Content-Type: application/json"
-d '{"id":"multicastdn%2fspool","connectiondefinitionname":"multicastdns.outbound.MulticastDNSRegistry","resourceAdapterName":"MulticastDNS-connector"}'\
http://localhost:4848/management/domain/resources/connector-connection-pool -v

# other check
curl --user admin:pwd -X POST -H "Accept: application/JSON" \
-d id=multicastdns%2fpool \
-d connectiondefinitionname=multicastdns.outbound.MulticastDNSRegistry \
-d resourceAdapterName=MulticastDNS-connector \
http://localhost:4848/management/domain/resources/connector-connection-pool -v

Simular results if I want to delete a existing resource.

curl --user admin:pwd -X DELETE -H "Accept: application/JSON" \
http://localhost:4848/management/domain/resources/connector-connection-p... -v

# other try
curl --user admin:pwd -X DELETE -H "Accept: application/JSON" \
-d id=multicastdns%2fpool \
http://localhost:4848/management/domain/resources/connector-connection-pool -v

Same issue if try the second step with connector resource asadmin create-connector-resource --poolname multicastdns/pool jca/multicastdns

Get via REST works but add and delete a entry into connetor-connection-pool List won't work.

I try so many things I don't see my mistake doing the add and delete stuff.
Or found I a bug in Glassfish for administrate connector-connection-pool and connector-resource via REST.