activemq no such method

Create issue
Issue #45 new
Remco Cats created an issue

Hoi Gerco,

Ik heb een bug gevonden in de message manager en meteen opgelost. In activemq i.c.m. fuse kreeg ik de melding no such method setUsername. In active mq heet die setUserName vandaar. In BasicCredentials.java moet de volgende methode worden vervangen: /* * Attemps to set username and password on the ConnectionFactory using reflection. If * this doesn't work for some messaging providers - they will have to provide their own * Credentials implementation and dialogs to create such objects. / public void apply(ConnectionFactory cf) throws Exception { Method setUsername = null; try { setUsername = cf.getClass().getMethod("setUsername", new Class[] { String.class} ); } catch (NoSuchMethodException e) { setUsername = cf.getClass().getMethod("setUserName", new Class[] { String.class} ); } setUsername.invoke(cf, new Object[] { getUsername() });

    Method setPassword = cf.getClass().getMethod("setPassword", new Class[] { String.class} );
    setPassword.invoke(cf, new Object[] { getPassword() });
}

groetjes,

Remco

Comments (1)

  1. Gerco Dries repo owner

    Dank je wel! Ik ben momenteel op vakantie, maar ik zal deze aanpassing doorvoeren zodra ik terug ben (eind augustus).

    Bedankt!

    Gerco.

    PS. Sent from a small device, please excuse any typos.

  2. Log in to comment