users@glassfish.java.net

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

From: <forums_at_java.net>
Date: Mon, 28 Jan 2013 02:15:30 -0600 (CST)

For a remote administration of multible Glassfish 3.1.2.2 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.
Example: curl --user admin:pwd -X GET -H "Accept: application/JSON"
http://localhost:4848/management/domain/resources/connector-connection-pool
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
http://docs.oracle.com/cd/E18930_01/html/821-2416/gjipx.html#gjijx or
http://docs.oracle.com/cd/E19798-01/821-1751/gjijx/index.html But for all
things I tried I got 400 Bad Request. Example 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-pool/multicastdns%2fpool
-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
Summary 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 fund I a bug in Glassfish 3.1.2.2
for administrate connector-connection-pool and connector-resource via REST.
florian

--
[Message sent by forum member 'floris2013']
View Post: http://forums.java.net/node/894203