Is it reasonable to add a new method SipFactory.createApplicationSession(String sipApplicationKey) to correlate incoming initial requests with application created application session?

4 views
Skip to first unread message

Harry

unread,
Aug 8, 2007, 6:13:32 AM8/8/07
to SIP Servlet Discussions
In JSR289 section 15.11.2 Session Key Based Targeting Mechanism,
applications are allowed to define a method to correlate incoming
initial requests into a common SipApplicationSession. But it seems by
this mechanism, application can't correlate incoming initial requests
to a SipApplicationSession instance created through
SipFactory.createApplicationSession().
Is it reasonable to add a new method
SipFactory.createApplicationSession(String sipApplicationKey), so that
applications could correlate the sessions by their own mechanism?
This sipApplicationKey is the same as the key returned by
@SipApplicationKey-annotated method, and the container should generate
the same application-session-id by appending app-name information to
it.

Another issue is whether container should generate Id automatically if
@SipApplicationKey-annotated method return null.

Harry

unread,
Aug 8, 2007, 6:27:45 AM8/8/07
to SIP Servlet Discussions

Nasir Khan

unread,
Aug 8, 2007, 5:40:44 PM8/8/07
to sipse...@googlegroups.com
Yes this seems very reasonable. Thanks for finding this.
Also for the null return case I will add the text in the next draft to
indicate that container should generate the Id by itself.

Thanks
Nasir


Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

Erik van der Velden

unread,
Aug 9, 2007, 5:50:53 AM8/9/07
to SIP Servlet Discussions
Hi Nasir,

I agree with this concept; the application can manage its own keys for
sessions, regardless off how it is created.
But, strangely enough there is no way to retrieve the
SipAPplicationSession using the application's sip application key!

The Spec says that the container can use the key to generate the
sessionID but can for example append stuff to make it unique. But the
application is not aware of this container specific mapping.

Should there not also be a way for the application to retrieve the SAS
via the SipApplicationKey? Or some method to derive a SASid from a
SASkey?
Of course, this could be solved with the addKey() functionality
discussed elsewhere, i.e., the application could add the SASkey as an
additional key to the SAS, which is a more generic solution to the
issue I address here.

Regards, Erik

Nasir Khan

unread,
Aug 13, 2007, 4:54:09 PM8/13/07
to sipse...@googlegroups.com
If required the addKey mechanism could address it as you mentioned. The
SAS can also be looked up by the Id using the SipSessionsUtil.

- Nasir

Erik van der Velden

unread,
Sep 19, 2007, 3:19:39 AM9/19/07
to SIP Servlet Discussions

I have one question about the above propsed method
SipFactory.createApplicationSession(String appKey).

What would happen if a SipApplicationSession with the appKey already
exists?
To be consistent with the @SipApplicationKey behaviour I would suggest
to return the existing SipApplicationSession in this case.

What do you think?

Regards, Erik

Harry

unread,
Sep 26, 2007, 1:53:53 AM9/26/07
to SIP Servlet Discussions
I think so too. But if such it seems method name
createApplicationSession(String appKey) is not very suitable. I
recommend change it as getApplicationSessionInstance(String appKey) or
getOrCreateApplicationSession(String appKey) or something likewise.

On Sep 19, 3:19 pm, Erik van der Velden

> > Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.- Hide quoted text -
>
> - Show quoted text -

Reply all
Reply to author
Forward
0 new messages