小编rev*_*eve的帖子

JNDI 没有可用于处理的 EJB 接收器

我的 EJBTest 有问题。

我已经安装了WildFly并配置了用户管理和应用程序管理。

我编写了一个 EJB 3.0 并部署了它:

@Stateless
@Remote(NewSessionBeanRemote.class)
public class NewSessionBean implements NewSessionBeanRemote {

    List<String> bookShielf;

    /**
     * Default constructor. 
     */
    public NewSessionBean() {
        bookShielf = new ArrayList<String>();
    }

    @Override
    public void addBook(String bookName) {
        bookShielf.add(bookName);
    }

    @Override
    public List getBook() {
        return bookShielf;
    }
}
Run Code Online (Sandbox Code Playgroud)

后来我写了一个简单的客户端来连接它:

private static void invokeStatelessBean() throws NamingException {
    // Let's lookup the remote stateless calculator
    NewSessionBeanRemote remoteEjb = lookupRemoteSessionBean();
    System.out.println("Obtained a remote stateless calculator for invocation");
    String bookName = "TEST book";
    remoteEjb.addBook(bookName); …
Run Code Online (Sandbox Code Playgroud)

java error-handling ejb jndi wildfly-10

2
推荐指数
1
解决办法
7066
查看次数

关闭创建的jQuery元素

我有这个问题:

$(document).ready(function() {                                 
    $('#buttonTest').click(function() {                        
        $.get('/WebTestProject/ServletEsempio', function(responseJson) {         
            var $table = $('<table>').appendTo($('#result')); 
            $.each(responseJson, function(index, product) {    
                $('<tr>').appendTo($table)                     
                    .append($('<td>').text(index))       
                    .append($('<td>').text(product))    
            });
        });
    });
});
Run Code Online (Sandbox Code Playgroud)

这段代码可以调用我的servlet,但我没有找到如何关闭TAG,和.可能吗?

非常感谢大家.

html ajax jquery

1
推荐指数
1
解决办法
348
查看次数

标签 统计

ajax ×1

ejb ×1

error-handling ×1

html ×1

java ×1

jndi ×1

jquery ×1

wildfly-10 ×1