I'm using Wildfire from Jive as my jabber server.

my servicemix.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
       xmlns:foo="http://servicemix.org/demo/";>

<sm:container id="jbi" useMBeanServer="false" createMBeanServer="false"
dumpStats="true" statsInterval="10">

        <sm:activationSpecs>
                <sm:activationSpec componentName="myJabberSender"
service="foo:myJabberSender" endpoint="myJabberSender">
                        <sm:component>
                                <bean
class="org.apache.servicemix.components.jabber.JabberGroupChatSender">
                                    <property name="host" value="b-0515"/>
                                    <property name="port" value="5222"/>
                                    <property name="resource" 
value="localhost"/>
                                    <property name="room" value="[EMAIL 
PROTECTED]"/>
                                    <property name="password" value="account"/>
                                    <property name="user" value="myaccount"/>
                                </bean>
                        </sm:component>
                </sm:activationSpec>
        </sm:activationSpecs>
</sm:container >
 </beans>



Here's the start method being called by the JabberGroupChatSender class.
It attempts to create an account every time servicemix is started.
public abstract class JabberComponentSupport {

    public void start() throws JBIException {
        try {
            if (connection == null) {
                if (port > 0) {
                    connection = new XMPPConnection(host, port);
                }
                else {
                    connection = new XMPPConnection(host);
                }
            }
            if (login && !connection.isAuthenticated()) {
                if (user != null) {
                    AccountManager accountManager = new
AccountManager(connection);
                    accountManager.createAccount(user, password);

                    log.info("Logging in to Jabber as user: " + user + " on
connection: " + connection);
                    connection.login(user, password, resource);
                }
                else {
                    log.info("Logging in anonymously to Jabber on
connection: " + connection);
                    connection.loginAnonymously();
                }
            }
        }
        catch (XMPPException e) {
            throw new JBIException("Failed to login to Jabber. Reason: " +
e, e);
        }
    }


I have to delete the account before I start servicemix or I'll get a big
stack trace and servicemix won't start.  This doesn't seem correct and I
missing something here?

Also, the chat room doesn't appear to get created.  Has anyone else managed
to get this working ?


-- 
View this message in context: 
http://www.nabble.com/Jabber-Question-tf2087141.html#a5752390
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to