voyent
Configuring AHS to work with the Glassfish Application Server  XML
Forum Index -> Async HTTP Server
Author Message
mwallace

Joined: 14/Sep/2007 00:00:00
Messages: 2
Offline


Hi all,

I'm having a little trouble getting the Asynchronous HTTP Server up and running with the Glassfish Application Server.

The first problem I ran into was setting the JMS related properties (listed in the AHS Deployment Guide). I'm not sure how to add a new properties file to Glassfish so I am trying to add the properties directly to AHS' web.xml config file.

The next thing I'm not sure how to do is configure Glassfish (and Grizzly?) to work with AHS.

Could you reply with a little "howto" on getting the AHS up and running with the Glassfish AS? It would be much appreciated!

-Matt
jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Hi Matt,

We haven't tested the ICEfaces AHS with Glassfish yet. However, that doesn't mean it won't work with Glassfish of course ;-)
What version of Glassfish are you currently using?

Regards,

Jack van Ooststroom
Senior Developer
ICEsoft Technologies, Inc.
[Email]
mwallace

Joined: 14/Sep/2007 00:00:00
Messages: 2
Offline


Hi Jack,

I'm currently running the newest stable release of Glassfish. I believe it is simply labeled as Version 2. My bad on not knowing where the "include properties" file(s) were.

I found them and created a glassfish.properties file and changed the appropriate entry in the AHS web.xml file. I just don't know what the JMS related property values are supposed to be.

Unfortunately I don't have a clue as to how you configure the HTTP Server (Grizzly or whatever they've implemented on top of it) that Glassfish uses. My gut feeling is that any configuration of Grizzly is pretty different from the Apache instructions in your Deployment Guide.

Thanks for any help in advance!

-Matt
jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Hi Matt,

Sorry for the wait. It took me a bit longer to figure it out. However, here it goes:

First you'll need to create a JMS Connection Factory. Using the Admin Console of GlassFish, navigate to Resources -> Connection Factories in the tree on the left and click on "New...". Enter "ConnectionFactory" for the JNDI Name and "javax.jms.ConnectionFactory" for the Resource Type. Additionally, I removed the "Password" and "UserName" properties for my testing, but I'm not sure if I had to do that. Then click "OK" to create the JMS Connection Factory.

Then you'll need to create the various JMS Destination Resources. Again using the Admin Console, navigate to Resources -> Destination Resources and click on "New...". Enter "icefaces_contextEventTopic" for the JNDI Name and Physical Destination Name, and "javax.jms.Topic" for the Resource Type. Then click on "OK" to create the JMS Destination Resource. Repeat this for "icefaces_renderTopic" and "icefaces_responseTopic".

Please note that the topic names contain underscores instead of dots. GlassFish doesn't seem to like dots in the names. I'll create a new JIRA case to address this. ICEfaces AHS should use default names that can be used across the various application servers, but these names should be configurable as well. For now, if you want, you can change these names inside the ICEfaces AHS source. The com.icesoft.util.net.messaging.MessageServiceClient class contains the names of the topics required. As you can see in this class, all the names (CONTEXT_EVENT_TOPIC_NAME, RENDER_TOPIC_NAME and RESPONSE_TOPIC_NAME) start with "icefaces.". If you replace the dots with underscores, it should work for now on GlassFish.

Attached you'll find the glassfish.properties file which you can put in the icefaces-ahs/src/com/icesoft/util/net/messaging/jms folder.

Now you can rebuild ICEfaces AHS in order to get the right icefaces-ahs.jar which is needed for your application. The resulting async-http-server.war in the icefaces-ahs/dist folder should be good to go, as you already changed the web.xml indicating to use the glassfish.properties, right?

Finally, you'll have to setup a web server like Apache HTTPd as the front-end. This is explained in the guide, but if you would like to have help with this, please let me know.

I hope this information helps you further with ICEfaces AHS and GlassFish.

Regards,
 Filename glassfish.properties [Disk] Download
 Description JMS properties for GlassFish
 Filesize 2 Kbytes
 Downloaded:  489 time(s)


Jack van Ooststroom
Senior Developer
ICEsoft Technologies, Inc.
[Email]
jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


FYI, I opened a new JIRA case to address this issue: ICE-2214

Regards,

Jack van Ooststroom
Senior Developer
ICEsoft Technologies, Inc.
[Email]
 
Forum Index -> Async HTTP Server
Go to:   
Powered by JForum 2.1.7ice © JForum Team