我寫了下面的代碼來設置我的Context
:OpenJMS:不可能設置INITIAL_CONTEXT_FACTORY
Properties properties = new Properties();
properties.put(Context.PROVIDER_URL, "tcp://localhost:3035");
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.exolab.jms.jndi.InitialContextFactory");
Context context = new InitialContext(properties);
然而,當我執行的罐子,我得到這個異常(注:不是我做的彙編+對不起我在這裏不寫):http://pastebin.com/5i9SbvEh
我不知道爲什麼,因爲我居然有jndi
,jms
和openjms
罐子(我One-JAR
做到了)。