dev@glassfish.java.net

Re: REST API and slashes in resource names

From: Tim Quinn <tim.quinn_at_oracle.com>
Date: Thu, 27 May 2010 14:55:34 -0500

If the resource name contains a slash, then would it work to encode
the slash in the path?

  http://localhost:4848/management/domain/resources/admin-object-resource/jndi%2Ffoo

Just a thought.

- Tim


On May 27, 2010, at 2:40 PM, Jason Lee wrote:

> I've run into an issue with REST API. Take this URL: http://localhost:4848/management/domain/resources/admin-object-resource/jndi-foo
>
> The resource name is identified by the last...segment of the URI, in
> this case jndi-foo. The system then takes that name and passes it
> to the CLI. The problem is that the actual ID in the system is jndi/
> foo, not jndi-foo We have to, then, convert that - to a /, but we
> can't do it every time, as my-connection-pool is a valid name. We
> could use, I guess, a query string param :
>
> http://localhost:4848/management/domain/resources/admin-object-resource/jndi-foo?convertDash=true
>
> But jndi/my-connection is a valid resource name as well, and that
> resource would be identified by
>
> http://localhost:4848/management/domain/resources/admin-object-resource/jndi-my-connection
>
> Just replacing the first dash won't be sufficient either, as
> "foo/" (be it jdbc, jms, etc) is not required in the JNDI/resource
> name, so my-jms-destination is valid.
>
> Anyone have any great ideas on how best to convert the resource name
> in the URI to the actual resource name in domain.xml?
>
> --
> Jason Lee
> Senior Member of Technical Staff
> GlassFish Administration Console
>
> Oracle Corporation
> Phone x31197/+1 405-343-1964
> Blog http://blogs.steeplesoft.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>