English 中文(简体)
EJB3.1中SFSB参考文献
原标题:Store SFSB reference in EJB 3.1

I want to store a reference to a Stateful Session Bean and save it to the database or transfer it to another VM. As far as I read, in EJB 2.x this is possible using getHandle(). If I try to serialize the SFSB instance using Glassfish 3.1.1, I get the following exception:

java.io.NotSerializableException: com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate

此外,我还没有找到获得SFSB处理器的方法。 SFSB会话中所有关于EFBHome、EFBBbject、EFBClobalHome的引用都无效,即使该豆子由容器妥善管理。 如果我正确理解,不管怎样,EJB 3.1中也没有必要处理,因为开发商应该能够直接使用SFSB的引用。

处理同一问题,但建议使用JavaEEObjectInputStream 类方法并未在我的测试中暴露出该方法的读目标。 我想知道该方法如何运作。

有没有人能建议一种把玻璃鱼的SFSB序列起来的好方法来保存参考文献? 我不想把参考文献附在HTTP会议上(我这样说是因为人们建议到处这样做)。

问题回答




相关问题
Recommended way to develop using Jetty and Eclipse

I am currently developing a J2EE application and I would like to use Jetty. I would like to have iot integrated with Eclipse, so I could debug the appliaction. I ve tried out couple of plugins (...

Call function periodically in Java

we need run one function periodically in Java web application . How to call function of some class periodically ? Is there any way that call function when some event occured like high load in server ...

Why make an EJB rather than a Web Service?

I would have thought that there is a lot of information out there on this, but I haven t found anything that really answers my question. What are the advantages of making an EJB rather than a web ...

Where should I put this configuration setting?

I m designing a fairly small web application which will run on a Sun application server (v9.1). It only has a few pages, no database of its own, and will retrieve/update data via web services. There s ...

JNDI Names -- Is Prefix "jdbc/" needed?

What s up with JNDI names? I m trying to get a javax.sql.DataSource using the new annotations feature of Java 5. It s not working for me, so I want to ask... I have a in my web.xml, inside of it is ...

hibernate interceptors : afterTransactionCompletion

I wrote a Hibernate interceptor : public class MyInterceptor extends EmptyInterceptor { private boolean isCanal=false; public boolean onSave(Object entity, Serializable arg1, Object[] arg2, String[]...

热门标签