Search in sources :

Example 1 with JndiConnection

use of org.eclipse.jst.server.generic.servertype.definition.JndiConnection in project webtools.servertools by eclipse.

the class ServerRuntimeImpl method basicSetJndiConnection.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetJndiConnection(JndiConnection newJndiConnection, NotificationChain msgs) {
    JndiConnection oldJndiConnection = jndiConnection;
    jndiConnection = newJndiConnection;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__JNDI_CONNECTION, oldJndiConnection, newJndiConnection);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : JndiConnection(org.eclipse.jst.server.generic.servertype.definition.JndiConnection) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with JndiConnection

use of org.eclipse.jst.server.generic.servertype.definition.JndiConnection in project webtools.servertools by eclipse.

the class ServerTypeDefinitionModelTest method testJNDIConnection.

public void testJNDIConnection() {
    JndiConnection jndi = subject.getJndiConnection();
    assertNotNull(jndi);
    assertTrue(jndi.getProviderUrl() != null && jndi.getProviderUrl().length() > 0);
    assertTrue(jndi.getInitialContextFactory() != null && jndi.getInitialContextFactory().length() > 0);
    assertNotNull(jndi.getJndiProperty());
    if (jndi.getJndiProperty().size() > 0) {
        ArgumentPair property = (ArgumentPair) jndi.getJndiProperty().get(0);
        assertNotNull(property.getName());
        assertNotNull(property.getValue());
    }
}
Also used : JndiConnection(org.eclipse.jst.server.generic.servertype.definition.JndiConnection) ArgumentPair(org.eclipse.jst.server.generic.servertype.definition.ArgumentPair)

Aggregations

JndiConnection (org.eclipse.jst.server.generic.servertype.definition.JndiConnection)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 ArgumentPair (org.eclipse.jst.server.generic.servertype.definition.ArgumentPair)1