Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Java [игнор отключен] [закрыт для гостей] / ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit / 5 сообщений из 5, страница 1 из 1
19.04.2013, 17:42:50
    #38233265
breath
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
в приложениии используется Stateful bean, при первом заказе(в текущей HttpSession) создается SFSB через JNDI и кладется в HttpSession, при уничтожении сессии - висит HttpSessionListener, вызывается метод @Remove у SFSB, + он удаляется из HttpSession руками, иногда , до окончании HttpSession, при обращении к SFSB вылетает javax.ejb.NoSuchObjectLocalException
это и не понятно,
спасибо
...
Рейтинг: 0 / 0
19.04.2013, 19:27:01
    #38233446
Blazkowicz
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
Повешайте слушателя на SFSB и смотрите когда он и почему убивается. Может контейнер по таймауту бин уничтожает, полагая что он не активный больше.
...
Рейтинг: 0 / 0
19.04.2013, 20:56:45
    #38233506
breath
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
разве контейнер может сам безвозвратно уничтожить 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 не вызывается, то есть бин должен десериализоваться обратно в винта, или я не понимаю чего то
...
Рейтинг: 0 / 0
21.04.2013, 11:24:06
    #38234177
breath
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
возможно вот оно
...
Рейтинг: 0 / 0
21.04.2013, 11:25:31
    #38234178
breath
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit
возможно вот оно,
http://docs.oracle.com/javaee/6/api/javax/ejb/StatefulTimeout.html
книги не успевают
...
Рейтинг: 0 / 0
Форумы / Java [игнор отключен] [закрыт для гостей] / ejb3 stateful bean - javax.ejb.NoSuchObjectLocalException: The EJB does not exit / 5 сообщений из 5, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]