-1
package com.apress.springrecipes.post;
import javax.ejb.Remote;
import javax.ejb.Stateless;
@Stateless
@Remote({ PostageService.class })
public class PostageServiceBean implements PostageService {
public double calculatePostage(String country, double weight) {
return 1.0;
}
}
jndi-name="PostageServiceBeanRemote">
<jee:environment>
java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory
java.naming.provider.url=ejbd://127.0.0.1:4201
</jee:environment>
</jee:jndi-lookup>
<bean id="frontDesk"
class="com.apress.springrecipes.post.FrontDeskImpl">
<property name="postageService" ref="postageService"/>
</bean>
</beans>
我花了更多時間格式化,然後你做了複製和粘貼。請添加一些解釋您的代碼片段的單詞,併爲我們提供更好的代碼示例。 – Nix 2011-05-31 16:43:40
這個問題沒有什麼意義,請解釋一下它是什麼,否則這將被關閉。 – 2011-11-01 03:28:45