()
| 162 | } |
| 163 | |
| 164 | public static MessageProducer getProducer() { |
| 165 | try { |
| 166 | checkAndInitialize(); |
| 167 | |
| 168 | MessageProducer producer = s_instance.m_producer; |
| 169 | |
| 170 | if (producer != null) { |
| 171 | return producer; |
| 172 | } else { |
| 173 | return NullMessageProducer.NULL_MESSAGE_PRODUCER; |
| 174 | } |
| 175 | } catch (Exception e) { |
| 176 | errorHandler(e); |
| 177 | return NullMessageProducer.NULL_MESSAGE_PRODUCER; |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | // this should be called during application initializing |
| 182 | public static void initialize(ClientConfig config) { |