Hi all,

I'm using SonicMQ and triying Axis2's current and the new JMS implementations 
over it.

When I enable the security of my broker, it requires username and password to 
be passed while creating a connection. The current JMS implementation supports 
this kind of connection. Is there any reason why we don't have this feature 
anymore?

It can easily be achived by replacing the line

  con = connectionFac.createConnection();
 
with following lines

  if (username != null && password != null) {
      con = connectionFac.createConnection(username, password);
  } else {
      con = connectionFac.createConnection();
  }
 
Here, username and password can be loaded from the configuration context as 
follows:

  AxisConfiguration axisConf = context.getAxisService().getAxisConfiguration(); 
   String username = (String) 
axisConf.getParameter(Constants.USER_NAME).getValue();
   String password = (String) 
axisConf.getParameter(Constants.PASSWORD).getValue();
 
Any comments?

Regards,

Ali Sadik Kumlali





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to