if (moveable.toNextSibling(J2EE_NAMESPACE, "message-driven-destination")) {
if (new QName(J2EE_NAMESPACE, "message-driven-destination").equals(moveable.getName()) || moveable.toNextSibling(J2EE_NAMESPACE, "message-driven-destination")) {
    public static void convertBeans(XmlCursor cursor, XmlCursor moveable) {        cursor.toChild(J2EE_NAMESPACE, "ejb-jar");        cursor.toChild(J2EE_NAMESPACE, "enterprise-beans");        if (cursor.toFirstChild()) {            //there's at least one ejb...            do {                cursor.push();                String type = cursor.getName().getLocalPart();                if ("session".equals(type)) {                    cursor.toChild(J2EE_NAMESPACE, "transaction-type");                    cursor.toNextSibling();                    convertToJNDIEnvironmentRefsGroup(cursor, moveable);                } else if ("entity".equals(type)) {                    //reentrant is the last required tag before jndiEnvironmentRefsGroup                    cursor.toChild(J2EE_NAMESPACE, "reentrant");                    //Convert 2.0 True/False to true/false for 2.1                    cursor.setTextValue(cursor.getTextValue().toLowerCase());                    cursor.toNextSibling(J2EE_NAMESPACE, "cmp-version");                    cursor.toNextSibling(J2EE_NAMESPACE, "abstract-schema-name");                    while (cursor.toNextSibling(J2EE_NAMESPACE, "cmp-field")) ;                    cursor.toNextSibling(J2EE_NAMESPACE, "primkey-field");                    cursor.toNextSibling();                    convertToJNDIEnvironmentRefsGroup(cursor, moveable);                } else if ("message-driven".equals(type)) {                    cursor.toFirstChild();                    if (cursor.toNextSibling(J2EE_NAMESPACE, "messaging-type")) {                        cursor.toNextSibling(J2EE_NAMESPACE, "transaction-type");                    } else {                        cursor.toNextSibling(J2EE_NAMESPACE, "transaction-type");                        //add messaging-type                        cursor.insertElementWithText("messaging-type", J2EE_NAMESPACE, "javax.jms.MessageListener");                    }                    if (!cursor.toNextSibling(J2EE_NAMESPACE, "activation-config")) {                        boolean hasProperties = false;                        //skip transaction-type                        cursor.toNextSibling();                        //add activation-config-properties.                        moveable.toCursor(cursor);                        cursor.push();                        cursor.beginElement("activation-config", J2EE_NAMESPACE);                        hasProperties |= addActivationConfigProperty(moveable, cursor, "message-selector", "messageSelector");                        hasProperties |= addActivationConfigProperty(moveable, cursor, "acknowledge-mode", "acknowledgeMode");                        if (moveable.toNextSibling(J2EE_NAMESPACE, "message-driven-destination")) {                            moveable.push();                            moveable.toFirstChild();                            hasProperties |= addActivationConfigProperty(moveable, cursor, "destination-type", "destinationType");                            hasProperties |= addActivationConfigProperty(moveable, cursor, "subscription-durability", "subscriptionDurability");                            moveable.pop();                            moveable.removeXml();                        }                        cursor.pop();                        if (!hasProperties) {                            cursor.toPrevSibling();                            cursor.removeXml();                        }                    }                    cursor.toNextSibling();                    convertToJNDIEnvironmentRefsGroup(cursor, moveable);                }                cursor.pop();            } while (cursor.toNextSibling());        }    }