0
내가 JUnit을에 제이보스 원격 실행하기 위해 노력하고있어 나는 오류 받고 있어요 :어떻게 JBoss 원격 오류를 해결할 수 있습니까?
이import static org.junit.Assert.*;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.SessionManager;
public class Test1 {
private static SessionManager _service;
@BeforeClass
public static void doSms() throws Exception {
String JBOSS_CONTEXT = "org.jboss.naming.remote.client.InitialContextFactory";
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT);
properties.put(Context.PROVIDER_URL, "remote://localhost:4447");
properties.put(Context.SECURITY_PRINCIPAL, "testuser");
properties.put(Context.SECURITY_CREDENTIALS, "testpassword");
_service = (SessionManager) new InitialContext(properties).lookup("java:global/SessionManager");
}
}
두 개의 병 (/ w 다른 버전)을 삭제했지만 변경 사항이 없습니다. – Glavryba