Exemplo n.º 1
0
 /** TODO */
 public static String[] getJDBCResourceNames(RESTOperations ops) {
   try {
     Result result = ops.get(LIST_URI, MediaType.APPLICATION_JSON, Result.class);
     return result.getChildrenMessages();
   } catch (JAXBException e) {
     throw new RuntimeException(
         "Failure to get JDBC resource from GlassFish@" + ops.getServer(), e);
   }
 }
Exemplo n.º 2
0
 /** TODO */
 public static JDBCResource getJDBResource(RESTOperations ops, String name) {
   try {
     return ops.get(
         RESOURCE_URI + name.replace("/", "%2F"), MediaType.APPLICATION_JSON, JDBCResource.class);
   } catch (JAXBException e) {
     throw new RuntimeException(
         "Failure to get JDBC resource from GlassFish@" + ops.getServer(), e);
   }
 }