« Return to Thread: How to deploy your own Application Router

Re: How to deploy your own Application Router

by Erik van der Velden-2 :: Rate this Message:

Reply to Author | View in Thread

This was a long time ago.
In the mean time the AR deployment has been changed to comply to the JSR 289.

If you have a look at the latests samples there are some examples on how to deploy your own AR.
Also, I sent some mails sent to this list when the AR interface changed, so you can try to dig up those.

Regards, Erik


On Thu, 2008-12-04 at 06:00 -0800, Sent wrote:
Hi Yvo,

I got some trouble in deploying my own application router into sailfin
(glassfish).
I followed your instruction but i got an error message like: "your jar file
is not correct"
but my jar looks like:
> com > test > basic > SipApplicationRouterArrayListImpl.class      
> META-INF > MANIFEST.MF

and into the MANIFEST.MF:
Manifest-Version: 1.0
Application-Router-Class: com.test.basic.SipApplicationRouterArrayListImpl

I used "asadmin deploy myApplicationRouter.jar" but anyway i got:
E:\sailfin\bin>asadmin deploy myApplicationRouter.jar
CLI171 Command deploy failed : Deploying application in domain failed;
Unrecognized module type for
C:\TEMP\s1astempdomain1server808697086\myApplicationRouter.jar; the archive
may be incorrectly constructed, non-existent, or inaccessible from the
server.
For example, an application client jar should include the proper manifest
file entry, and an ejb jar should contain at least one EJB.

any idea about that?

Best regards,

vincent.



Yvo Bogers (RY/ETM) wrote:
> 
> Hi,
> 
> Stoffe rightly pointed out to me that I never sent these instructions
> around so here goes.  
> 
> In the current version of SailFin , it is possible to replace the
> 'built-in' Application Router with your own. You can find two examples
> in the samples/ directory:
> 
> One is an AlphabeticalRouter - which actually is already built right
> into sailfin so no need to deploy that, just use it as an example to
> construct your own. 
> The other one is a DefaultApplicationRouter as specified by Appendix C
> of the JSR289 PR draft. Note however that, although it is
> "DefaultApplicationRouter", the spec does not mandate that every AS has
> to work like this out-of-the-box. In sailfin, the AlphabeticalRouter was
> chosen as a default instead.
> 
> Both examples contain a README on how to get started. Note that the
> Application Router deployment and configuration is likely to change when
> the final version of JSR289 comes out, so these examples will also need
> to be updated then. 
> 
> How it works now:
> 
> 1. Create a class that implements the
> javax.servlet.sip.SipApplicationRouter interface. 
> 2. Create a Manifest.MF file containing the attribute
> Application-Router-Class: com.path.to.YourRouter
> 3. package your compiled code as a .jar and store the Manifest.MF from
> step 2. in the jar's META-INF directory.
> 4. run asadmin deploy yourarchive.jar
> 
> That will replace the AR in the running server with your new AR.
> 
> As said, this mechanism has been subject of discussion and is likely to
> change.
> 
> Any questions, let me know.
> Cheers,
> Yvo
> 
> 
> 

 « Return to Thread: How to deploy your own Application Router