Re: Problem with ThreadContext.getSession when session dies

2019-04-03 Thread Sven Meier

Hi Patrick,

Wicket uses a temporary session if there's no container session, e.g. 
the latter has already expired.

It's not clear to me why that's a problem for you.

Best regards
Sven


Am 03.04.19 um 13:26 schrieb Patrick Schwarzer:


Dear Sir or Madam,

we identified an issue during request handling in Wicket 7.12.0 when 
session dies during processing.


The problem is, that parts of the code accessing current session by 
calling Session.get() which then return a valid session cached in 
ThreadContext.getSession().


But when accessing an attribute of the Session, the code accesses the 
real session, which is dead and leads to an Exception.


So we were a little confused why Session.get() and Session.exists() 
return valid results when Session is already dead.
How we can avoid Session.get() and Session.exists() return valid 
results? Alternatively how we can ensure, that Request with cached 
Session is handled correctly?


The stack trace of our problem:

java.lang.IllegalStateException: 
org.apache.shiro.session.UnknownSessionException: There is no session 
with id [48cf6f39-9bf6-4b76-84cd-a106e707af63]


at 
org.apache.shiro.web.servlet.ShiroHttpSession.getAttribute(ShiroHttpSession.java:133) 
~[shiro-web-1.3.2.jar:1.3.2]


getAttribute:286, HttpSessionStore (org.apache.wicket.session)

getAttribute:743, Session (org.apache.wicket) *<< Why this is not 
accessing cached Session?*


getSessionAttribute:66, DefaultPageManagerContext (org.apache.wicket.page)

getSessionAttribute:101, RequestAdapter (org.apache.wicket.page)

getSessionEntry:414, PageStoreManager$PersistentRequestAdapter 
(org.apache.wicket.page)


storeTouchedPages:438, PageStoreManager$PersistentRequestAdapter 
(org.apache.wicket.page) *<<  Should this happen, when Session is 
already dead?*


commitRequest:193, RequestAdapter (org.apache.wicket.page)

commitRequest:76, AbstractPageManager (org.apache.wicket.page)

commitRequest:74, PageManagerDecorator (org.apache.wicket.page)

commitRequest:270, PageAccessSynchronizer$2 (org.apache.wicket.page)

onDetach:1798, Application$3 (org.apache.wicket)

notify:105, RequestCycleListenerCollection$3 
(org.apache.wicket.request.cycle)


notify:101, RequestCycleListenerCollection$3 
(org.apache.wicket.request.cycle)


notify:120, ListenerCollection$1 (org.apache.wicket.util.listener)

reversedNotify:144, ListenerCollection (org.apache.wicket.util.listener)

reversedNotifyIgnoringExceptions:113, ListenerCollection 
(org.apache.wicket.util.listener)


onDetach:100, RequestCycleListenerCollection 
(org.apache.wicket.request.cycle)


onDetach:649, RequestCycle (org.apache.wicket.request.cycle)

detach:594, RequestCycle (org.apache.wicket.request.cycle)

processRequestAndDetach:297, RequestCycle 
(org.apache.wicket.request.cycle)


processRequestCycle:261, WicketFilter (org.apache.wicket.protocol.http)

processRequest:203, WicketFilter (org.apache.wicket.protocol.http)

doFilter:284, WicketFilter (org.apache.wicket.protocol.http)

internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)

doFilter:166, ApplicationFilterChain (org.apache.catalina.core)

doFilterInternal:99, RequestContextFilter (org.springframework.web.filter)

doFilter:107, OncePerRequestFilter (org.springframework.web.filter)

internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)

doFilter:166, ApplicationFilterChain (org.apache.catalina.core)

doFilter:61, ProxiedFilterChain (org.apache.shiro.web.servlet)

executeChain:108, AdviceFilter (org.apache.shiro.web.servlet)

doFilterInternal:137, AdviceFilter (org.apache.shiro.web.servlet)

doFilter:125, OncePerRequestFilter (org.apache.shiro.web.servlet)

doFilter:66, ProxiedFilterChain (org.apache.shiro.web.servlet)

executeChain:108, AdviceFilter (org.apache.shiro.web.servlet)

doFilterInternal:137, AdviceFilter (org.apache.shiro.web.servlet)

doFilter:125, OncePerRequestFilter (org.apache.shiro.web.servlet)

doFilter:66, ProxiedFilterChain (org.apache.shiro.web.servlet)

executeChain:449, AbstractShiroFilter (org.apache.shiro.web.servlet)

call:365, AbstractShiroFilter$1 (org.apache.shiro.web.servlet)

doCall:90, SubjectCallable (org.apache.shiro.subject.support)

call:83, SubjectCallable (org.apache.shiro.subject.support)

execute:383, DelegatingSubject (org.apache.shiro.subject.support)

doFilterInternal:362, AbstractShiroFilter (org.apache.shiro.web.servlet)

doFilter:125, OncePerRequestFilter (org.apache.shiro.web.servlet)

invokeDelegate:357, DelegatingFilterProxy (org.springframework.web.filter)

doFilter:270, DelegatingFilterProxy (org.springframework.web.filter)

internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)

doFilter:166, ApplicationFilterChain (org.apache.catalina.core)

invoke:198, StandardWrapperValve (org.apache.catalina.core)

invoke:96, StandardContextValve (org.apache.catalina.core)

invoke:478, AuthenticatorBase (org.apache.catalina.authenticator)

invoke:140, StandardHostValve (org.apache.catalina.core)

invok

Re: web sockets messages + page identities

2019-04-03 Thread Ernesto Reinaldo Barreiro
Hi,

Thanks for your answer. Yes my answer was more on the spirit if there is
something already available and ready to use Or if it makes sense to
have this by default at interface level.

On Wed, Apr 3, 2019 at 3:37 PM Maxim Solodovnik 
wrote:

> Hello Ernesto,
>
> We also have code to send websocket messages "to others"
> I do store active client list (each page/tab is client)
> Every client stores pageId and sessionId
>
> Then I do filtering on pageId+sessionId
>
> This seems to work as expected
>
> On Wed, 3 Apr 2019 at 18:18, Ernesto Reinaldo Barreiro
>  wrote:
> >
> > Hi,
> >
> > I have the following use case.
> >
> > 1- One browser tab sends a text message
> > 2- Other browser tabs should receive message (but emitting tab not).
> >
> > I have done
> >
> > add(*new *WebSocketBehavior() {
> > @Override
> > *protected void *onMessage(WebSocketRequestHandler handler, TextMessage
> > message) {
> > sendNotificationToSession()
> > }
> > });
> >
> >
> >
> > *public void *sendNotificationToSession(String sessionId) {
> > *if *(com.rometools.utils.Strings.*isEmpty*(sessionId)) {
> > *throw new *IllegalArgumentException(*"sessionId cannot be empty"*);
> > }
> > Application application = Application.*get*(KmsContext.*APP_NAME*);
> >
> privateSendNotificationTo(getRegistry(application).getConnections(application,
> > sessionId));
> > }
> >
> >
> > *private void *privateSendNotificationTo(Collection
> > webSocketConnections) {
> > String message = toJSON();
> > *for*(IWebSocketConnection connection : webSocketConnections) {
> > *if *(connection.isOpen()) {
> > *try *{
> > connection.sendMessage(message);
> > } *catch *(IOException e) {
> > *log*.error(*"Could not send notification"*, e);
> > *//$NON-NLS-1$ *}
> > }
> > }
> > }
> >
> >
> > I see some classes like
> >
> >
> >
> >
> >
> > */**  * A base message for all messages with information about the client
> >  */ **public abstract class *AbstractClientMessage *implements *
> > IWebSocketMessage
> > {
> > *private final *String *applicationName*;
> > *private final *String *sessionId*;
> > *private final *IKey *key*;
> >
> > *public *AbstractClientMessage(Application application, String sessionId,
> > IKey key)
> > {
> > *this*.*applicationName *= Args.*notNull*(application, *"application"*
> > ).getName();
> > *this*.*sessionId *= Args.*notNull*(sessionId, *"sessionId"*);
> > *this*.*key *= Args.*notNull*(key, *"key"*);
> > }
> >
> > *public *Application getApplication()
> > {
> > *return *Application.*get*(*applicationName*);
> > }
> >
> > *public *String getSessionId()
> > {
> > *return **sessionId*;
> > }
> >
> > *public *IKey getKey()
> > {
> > *return **key*;
> > }
> >
> > }
> >
> >
> > provide IKey as "discriminator" of sending page. But this is neither part
> > of IWebSocketMessage nor it is part of IWebSocketConnection... So, I
> don't
> > really know to use to exclude the emitting page. This clearly would be
> > possible if both IWebSocketMessage and IWebSocketConnection have a IKey
> > getPageKey();
> >
> >
> > Is there a way to do this? Am I missing some essential part?
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
>
>
>
> --
> WBR
> Maxim aka solomax
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-- 
Regards - Ernesto Reinaldo Barreiro


Re: web sockets messages + page identities

2019-04-03 Thread Ernesto Reinaldo Barreiro
I meant my "question"

On Wed, Apr 3, 2019 at 4:18 PM Ernesto Reinaldo Barreiro 
wrote:

> Hi,
>
> Thanks for your answer. Yes my answer was more on the spirit if there is
> something already available and ready to use Or if it makes sense to
> have this by default at interface level.
>
> On Wed, Apr 3, 2019 at 3:37 PM Maxim Solodovnik 
> wrote:
>
>> Hello Ernesto,
>>
>> We also have code to send websocket messages "to others"
>> I do store active client list (each page/tab is client)
>> Every client stores pageId and sessionId
>>
>> Then I do filtering on pageId+sessionId
>>
>> This seems to work as expected
>>
>> On Wed, 3 Apr 2019 at 18:18, Ernesto Reinaldo Barreiro
>>  wrote:
>> >
>> > Hi,
>> >
>> > I have the following use case.
>> >
>> > 1- One browser tab sends a text message
>> > 2- Other browser tabs should receive message (but emitting tab not).
>> >
>> > I have done
>> >
>> > add(*new *WebSocketBehavior() {
>> > @Override
>> > *protected void *onMessage(WebSocketRequestHandler handler, TextMessage
>> > message) {
>> > sendNotificationToSession()
>> > }
>> > });
>> >
>> >
>> >
>> > *public void *sendNotificationToSession(String sessionId) {
>> > *if *(com.rometools.utils.Strings.*isEmpty*(sessionId)) {
>> > *throw new *IllegalArgumentException(*"sessionId cannot be empty"*);
>> > }
>> > Application application = Application.*get*(KmsContext.*APP_NAME*);
>> >
>> privateSendNotificationTo(getRegistry(application).getConnections(application,
>> > sessionId));
>> > }
>> >
>> >
>> > *private void
>> *privateSendNotificationTo(Collection
>> > webSocketConnections) {
>> > String message = toJSON();
>> > *for*(IWebSocketConnection connection : webSocketConnections) {
>> > *if *(connection.isOpen()) {
>> > *try *{
>> > connection.sendMessage(message);
>> > } *catch *(IOException e) {
>> > *log*.error(*"Could not send notification"*, e);
>> > *//$NON-NLS-1$ *}
>> > }
>> > }
>> > }
>> >
>> >
>> > I see some classes like
>> >
>> >
>> >
>> >
>> >
>> > */**  * A base message for all messages with information about the
>> client
>> >  */ **public abstract class *AbstractClientMessage *implements *
>> > IWebSocketMessage
>> > {
>> > *private final *String *applicationName*;
>> > *private final *String *sessionId*;
>> > *private final *IKey *key*;
>> >
>> > *public *AbstractClientMessage(Application application, String
>> sessionId,
>> > IKey key)
>> > {
>> > *this*.*applicationName *= Args.*notNull*(application, *"application"*
>> > ).getName();
>> > *this*.*sessionId *= Args.*notNull*(sessionId, *"sessionId"*);
>> > *this*.*key *= Args.*notNull*(key, *"key"*);
>> > }
>> >
>> > *public *Application getApplication()
>> > {
>> > *return *Application.*get*(*applicationName*);
>> > }
>> >
>> > *public *String getSessionId()
>> > {
>> > *return **sessionId*;
>> > }
>> >
>> > *public *IKey getKey()
>> > {
>> > *return **key*;
>> > }
>> >
>> > }
>> >
>> >
>> > provide IKey as "discriminator" of sending page. But this is neither
>> part
>> > of IWebSocketMessage nor it is part of IWebSocketConnection... So, I
>> don't
>> > really know to use to exclude the emitting page. This clearly would be
>> > possible if both IWebSocketMessage and IWebSocketConnection have a IKey
>> > getPageKey();
>> >
>> >
>> > Is there a way to do this? Am I missing some essential part?
>> >
>> >
>> > --
>> > Regards - Ernesto Reinaldo Barreiro
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: Adding busy indicator to Wizard finish button.

2019-04-03 Thread Maxim Solodovnik
Hello,

WizardButtons are being created here
https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardButtonBar.java

You could override one or more method and return IndicatingButton for ex.
https://github.com/sebfz1/wicket-jquery-ui/blob/wicket8.x/wicket-kendo-ui/src/main/java/com/googlecode/wicket/kendo/ui/form/button/IndicatingButton.java

Or maybe add 
https://github.com/sebfz1/wicket-jquery-ui/blob/wicket8.x/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/form/button/AjaxIndicatingButtonBehavior.java
:)

On Wed, 3 Apr 2019 at 11:42, sharofiddin  wrote:
>
> I need to add a busy indicator to the Finish button of the wizard. I tried
> several ways without success. Like this :
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=87917
> 
>
> --
> Sent from: 
> http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>


-- 
WBR
Maxim aka solomax

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: web sockets messages + page identities

2019-04-03 Thread Maxim Solodovnik
Hello Ernesto,

We also have code to send websocket messages "to others"
I do store active client list (each page/tab is client)
Every client stores pageId and sessionId

Then I do filtering on pageId+sessionId

This seems to work as expected

On Wed, 3 Apr 2019 at 18:18, Ernesto Reinaldo Barreiro
 wrote:
>
> Hi,
>
> I have the following use case.
>
> 1- One browser tab sends a text message
> 2- Other browser tabs should receive message (but emitting tab not).
>
> I have done
>
> add(*new *WebSocketBehavior() {
> @Override
> *protected void *onMessage(WebSocketRequestHandler handler, TextMessage
> message) {
> sendNotificationToSession()
> }
> });
>
>
>
> *public void *sendNotificationToSession(String sessionId) {
> *if *(com.rometools.utils.Strings.*isEmpty*(sessionId)) {
> *throw new *IllegalArgumentException(*"sessionId cannot be empty"*);
> }
> Application application = Application.*get*(KmsContext.*APP_NAME*);
> privateSendNotificationTo(getRegistry(application).getConnections(application,
> sessionId));
> }
>
>
> *private void *privateSendNotificationTo(Collection
> webSocketConnections) {
> String message = toJSON();
> *for*(IWebSocketConnection connection : webSocketConnections) {
> *if *(connection.isOpen()) {
> *try *{
> connection.sendMessage(message);
> } *catch *(IOException e) {
> *log*.error(*"Could not send notification"*, e);
> *//$NON-NLS-1$ *}
> }
> }
> }
>
>
> I see some classes like
>
>
>
>
>
> */**  * A base message for all messages with information about the client
>  */ **public abstract class *AbstractClientMessage *implements *
> IWebSocketMessage
> {
> *private final *String *applicationName*;
> *private final *String *sessionId*;
> *private final *IKey *key*;
>
> *public *AbstractClientMessage(Application application, String sessionId,
> IKey key)
> {
> *this*.*applicationName *= Args.*notNull*(application, *"application"*
> ).getName();
> *this*.*sessionId *= Args.*notNull*(sessionId, *"sessionId"*);
> *this*.*key *= Args.*notNull*(key, *"key"*);
> }
>
> *public *Application getApplication()
> {
> *return *Application.*get*(*applicationName*);
> }
>
> *public *String getSessionId()
> {
> *return **sessionId*;
> }
>
> *public *IKey getKey()
> {
> *return **key*;
> }
>
> }
>
>
> provide IKey as "discriminator" of sending page. But this is neither part
> of IWebSocketMessage nor it is part of IWebSocketConnection... So, I don't
> really know to use to exclude the emitting page. This clearly would be
> possible if both IWebSocketMessage and IWebSocketConnection have a IKey
> getPageKey();
>
>
> Is there a way to do this? Am I missing some essential part?
>
>
> --
> Regards - Ernesto Reinaldo Barreiro



-- 
WBR
Maxim aka solomax

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Problem with ThreadContext.getSession when session dies

2019-04-03 Thread Patrick Schwarzer
Dear Sir or Madam,
we identified an issue during request handling in Wicket 7.12.0 when session 
dies during processing.
The problem is, that parts of the code accessing current session by calling 
Session.get() which then return a valid session cached in 
ThreadContext.getSession().
[cid:image001.png@01D4EA1F.3FF53FB0]
But when accessing an attribute of the Session, the code accesses the real 
session, which is dead and leads to an Exception.
[cid:image002.png@01D4EA1F.3FF53FB0]
So we were a little confused why Session.get() and Session.exists() return 
valid results when Session is already dead.
How we can avoid Session.get() and Session.exists() return valid results? 
Alternatively how we can ensure, that Request with cached Session is handled 
correctly?


The stack trace of our problem:
java.lang.IllegalStateException: 
org.apache.shiro.session.UnknownSessionException: There is no session with id 
[48cf6f39-9bf6-4b76-84cd-a106e707af63]
at 
org.apache.shiro.web.servlet.ShiroHttpSession.getAttribute(ShiroHttpSession.java:133)
 ~[shiro-web-1.3.2.jar:1.3.2]
getAttribute:286, HttpSessionStore (org.apache.wicket.session)
getAttribute:743, Session (org.apache.wicket) << Why this is not accessing 
cached Session?
getSessionAttribute:66, DefaultPageManagerContext (org.apache.wicket.page)
getSessionAttribute:101, RequestAdapter (org.apache.wicket.page)
getSessionEntry:414, PageStoreManager$PersistentRequestAdapter 
(org.apache.wicket.page)
storeTouchedPages:438, PageStoreManager$PersistentRequestAdapter 
(org.apache.wicket.page) <<  Should this happen, when Session is already dead?
commitRequest:193, RequestAdapter (org.apache.wicket.page)
commitRequest:76, AbstractPageManager (org.apache.wicket.page)
commitRequest:74, PageManagerDecorator (org.apache.wicket.page)
commitRequest:270, PageAccessSynchronizer$2 (org.apache.wicket.page)
onDetach:1798, Application$3 (org.apache.wicket)
notify:105, RequestCycleListenerCollection$3 (org.apache.wicket.request.cycle)
notify:101, RequestCycleListenerCollection$3 (org.apache.wicket.request.cycle)
notify:120, ListenerCollection$1 (org.apache.wicket.util.listener)
reversedNotify:144, ListenerCollection (org.apache.wicket.util.listener)
reversedNotifyIgnoringExceptions:113, ListenerCollection 
(org.apache.wicket.util.listener)
onDetach:100, RequestCycleListenerCollection (org.apache.wicket.request.cycle)
onDetach:649, RequestCycle (org.apache.wicket.request.cycle)
detach:594, RequestCycle (org.apache.wicket.request.cycle)
processRequestAndDetach:297, RequestCycle (org.apache.wicket.request.cycle)
processRequestCycle:261, WicketFilter (org.apache.wicket.protocol.http)
processRequest:203, WicketFilter (org.apache.wicket.protocol.http)
doFilter:284, WicketFilter (org.apache.wicket.protocol.http)
internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)
doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
doFilterInternal:99, RequestContextFilter (org.springframework.web.filter)
doFilter:107, OncePerRequestFilter (org.springframework.web.filter)
internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)
doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
doFilter:61, ProxiedFilterChain (org.apache.shiro.web.servlet)
executeChain:108, AdviceFilter (org.apache.shiro.web.servlet)
doFilterInternal:137, AdviceFilter (org.apache.shiro.web.servlet)
doFilter:125, OncePerRequestFilter (org.apache.shiro.web.servlet)
doFilter:66, ProxiedFilterChain (org.apache.shiro.web.servlet)
executeChain:108, AdviceFilter (org.apache.shiro.web.servlet)
doFilterInternal:137, AdviceFilter (org.apache.shiro.web.servlet)
doFilter:125, OncePerRequestFilter (org.apache.shiro.web.servlet)
doFilter:66, ProxiedFilterChain (org.apache.shiro.web.servlet)
executeChain:449, AbstractShiroFilter (org.apache.shiro.web.servlet)
call:365, AbstractShiroFilter$1 (org.apache.shiro.web.servlet)
doCall:90, SubjectCallable (org.apache.shiro.subject.support)
call:83, SubjectCallable (org.apache.shiro.subject.support)
execute:383, DelegatingSubject (org.apache.shiro.subject.support)
doFilterInternal:362, AbstractShiroFilter (org.apache.shiro.web.servlet)
doFilter:125, OncePerRequestFilter (org.apache.shiro.web.servlet)
invokeDelegate:357, DelegatingFilterProxy (org.springframework.web.filter)
doFilter:270, DelegatingFilterProxy (org.springframework.web.filter)
internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)
doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
invoke:198, StandardWrapperValve (org.apache.catalina.core)
invoke:96, StandardContextValve (org.apache.catalina.core)
invoke:478, AuthenticatorBase (org.apache.catalina.authenticator)
invoke:140, StandardHostValve (org.apache.catalina.core)
invoke:80, ErrorReportValve (org.apache.catalina.valves)
invoke:650, AbstractAccessLogValve (org.apache.catalina.valves)
invoke:279, RewriteValve (org.apache.catalina.valves.rewrite)
invoke:677, RemoteIpValve (org.apache.catalina.valves)
invoke:87, Stan

web sockets messages + page identities

2019-04-03 Thread Ernesto Reinaldo Barreiro
Hi,

I have the following use case.

1- One browser tab sends a text message
2- Other browser tabs should receive message (but emitting tab not).

I have done

add(*new *WebSocketBehavior() {
@Override
*protected void *onMessage(WebSocketRequestHandler handler, TextMessage
message) {
sendNotificationToSession()
}
});



*public void *sendNotificationToSession(String sessionId) {
*if *(com.rometools.utils.Strings.*isEmpty*(sessionId)) {
*throw new *IllegalArgumentException(*"sessionId cannot be empty"*);
}
Application application = Application.*get*(KmsContext.*APP_NAME*);
privateSendNotificationTo(getRegistry(application).getConnections(application,
sessionId));
}


*private void *privateSendNotificationTo(Collection
webSocketConnections) {
String message = toJSON();
*for*(IWebSocketConnection connection : webSocketConnections) {
*if *(connection.isOpen()) {
*try *{
connection.sendMessage(message);
} *catch *(IOException e) {
*log*.error(*"Could not send notification"*, e);
*//$NON-NLS-1$ *}
}
}
}


I see some classes like





*/**  * A base message for all messages with information about the client
 */ **public abstract class *AbstractClientMessage *implements *
IWebSocketMessage
{
*private final *String *applicationName*;
*private final *String *sessionId*;
*private final *IKey *key*;

*public *AbstractClientMessage(Application application, String sessionId,
IKey key)
{
*this*.*applicationName *= Args.*notNull*(application, *"application"*
).getName();
*this*.*sessionId *= Args.*notNull*(sessionId, *"sessionId"*);
*this*.*key *= Args.*notNull*(key, *"key"*);
}

*public *Application getApplication()
{
*return *Application.*get*(*applicationName*);
}

*public *String getSessionId()
{
*return **sessionId*;
}

*public *IKey getKey()
{
*return **key*;
}

}


provide IKey as "discriminator" of sending page. But this is neither part
of IWebSocketMessage nor it is part of IWebSocketConnection... So, I don't
really know to use to exclude the emitting page. This clearly would be
possible if both IWebSocketMessage and IWebSocketConnection have a IKey
getPageKey();


Is there a way to do this? Am I missing some essential part?


-- 
Regards - Ernesto Reinaldo Barreiro