Search in sources :

Example 1 with JndiConnectionFactoryFactory

use of nl.nn.adapterframework.jndi.JndiConnectionFactoryFactory in project iaf by ibissource.

the class BrowseQueue method getBrowseQueue.

@GET
@RolesAllowed({ "IbisObserver", "IbisDataAdmin", "IbisAdmin", "IbisTester" })
@Path("jms")
@Produces(MediaType.APPLICATION_JSON)
public Response getBrowseQueue() throws ApiException {
    Map<String, Object> returnMap = new HashMap<String, Object>();
    JndiConnectionFactoryFactory connectionFactoryFactory = getIbisContext().getBean("connectionFactoryFactory", JndiConnectionFactoryFactory.class);
    Set<String> connectionFactories = new LinkedHashSet<String>();
    // connection factories used in configured jmsSenders etc.
    connectionFactories.addAll(connectionFactoryFactory.getConnectionFactoryNames());
    // configured jms realm
    connectionFactories.addAll(JmsRealmFactory.getInstance().getConnectionFactoryNames());
    if (connectionFactories.size() == 0)
        connectionFactories.add("no connection factories found");
    returnMap.put("connectionFactories", connectionFactories);
    return Response.status(Response.Status.OK).entity(returnMap).build();
}
Also used : LinkedHashSet(java.util.LinkedHashSet) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) JndiConnectionFactoryFactory(nl.nn.adapterframework.jndi.JndiConnectionFactoryFactory) Path(javax.ws.rs.Path) RolesAllowed(javax.annotation.security.RolesAllowed) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Aggregations

HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 RolesAllowed (javax.annotation.security.RolesAllowed)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1 JndiConnectionFactoryFactory (nl.nn.adapterframework.jndi.JndiConnectionFactoryFactory)1