|
|
|
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
|
|||
|---|---|---|---|
|
#18+
в приложениии используется Stateful bean, при первом заказе(в текущей HttpSession) создается SFSB через JNDI и кладется в HttpSession, при уничтожении сессии - висит HttpSessionListener, вызывается метод @Remove у SFSB, + он удаляется из HttpSession руками, иногда , до окончании HttpSession, при обращении к SFSB вылетает javax.ejb.NoSuchObjectLocalException это и не понятно, спасибо ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 19.04.2013, 17:42:50 |
|
||
|
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
|
|||
|---|---|---|---|
|
#18+
Повешайте слушателя на SFSB и смотрите когда он и почему убивается. Может контейнер по таймауту бин уничтожает, полагая что он не активный больше. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 19.04.2013, 19:27:01 |
|
||
|
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
|
|||
|---|---|---|---|
|
#18+
разве контейнер может сам безвозвратно уничтожить SFSB ? в ejb3 in action расписан такой lifecycle; However, you should note that we invoke the very same method for both the PreDestroy and PrePassivate callbacks: @PrePassivate @PreDestroy public void cleanup() { ... } Similarly, the exact same action is taken for both the PostConstruct and Post- Activate callbacks: @PostConstruct @PostActivate public void openConnection() { ... } To see why this is the case, let’s discuss activation and passivation in a little more detail. Passivation and activation If clients don’t invoke a bean for a long enough time, it is not a good idea to continue keeping it in memory. For a large number of beans, this could easily make the machine run out of memory. The container employs the technique of passivation to save memory when possible. Passivation essentially means saving a bean instance into disk instead of holding it in memory. The container accomplishes this task by serializing the entire bean instance and moving it into permanent storage like a file or the database. Activation is the opposite of passivation and is done when the bean instance is needed again. The container activates a bean instance by retrieving it from permanent storage, deserializing it, and moving it back into memory. This means that all bean instance variables that you care about and should be saved into permanent storage must either be a Java primitive or implement the java.io. Serializable interface. Destroying a stateful session bean Calling business methods marked with the @Remove annotation signifies a desire by the client to end the session. As a result, invoking these methods triggers immediate bean destruction. до окончании HttpSession или без явного logout юзера, ни один метод с @Remove не вызывается, то есть бин должен десериализоваться обратно в винта, или я не понимаю чего то ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 19.04.2013, 20:56:45 |
|
||
|
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
|
|||
|---|---|---|---|
|
#18+
возможно вот оно ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.04.2013, 11:24:06 |
|
||
|
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
|
|||
|---|---|---|---|
|
#18+
возможно вот оно, http://docs.oracle.com/javaee/6/api/javax/ejb/StatefulTimeout.html книги не успевают ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.04.2013, 11:25:31 |
|
||
|
|

start [/forum/topic.php?desktop=1&fid=59&tid=2129502]: |
0ms |
get settings: |
17ms |
get forum list: |
24ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
51ms |
get topic data: |
19ms |
get forum data: |
4ms |
get page messages: |
72ms |
get tp. blocked users: |
2ms |
| others: | 275ms |
| total: | 474ms |

| 0 / 0 |
