【发布时间】:2011-03-16 15:42:59
【问题描述】:
我正在使用带有resteasy实现的Restful Service并转为ejb。 我想知道在这种情况下我们如何创建创建会话并在 REST 服务中维护状态。 有没有可用的例子?
我使用的简单示例:
@Stateless
public class TestResource implements TestResourceLocal {
@Override
public test test(String id, String param) {
//todo
}
}
@Local
@Path("/affilate")
public interface AffiliateResourceLocal {
@GET
@Path("{id}-{param}")
@Produces("application/json")
public void test(@PathParam("id") String id, @PathParam("param") String param);
}
【问题讨论】:
标签: java session rest service ejb