Ok,

So I figured out my problem.   I have been debugging this bad boy for about a 
week and the minute I ask for help is when I figure it out. ☺

I will try to detail below, but the gist is to make sure and to exclude some 
jars in the war file otherwise they clash with jboss's deployment

For those that are trying to cluster CAS 3.2.1 with JBoss 4 (I am using JBoss 
4.2.2), the steps are pretty easy (As long as you know them):
1.  Add the following dependency to your pom.xml.  They key is to keep the 
jboss-cache but remove the rest of the jboss jards or you will see a "comp not 
bound" error in your server.log
                <dependency>
                        <groupId>org.jasig.cas</groupId>
                        <artifactId>cas-server-integration-jboss</artifactId>
                        <version>3.2.1-RC1</version>
                        <scope>runtime</scope>
                        <exclusions>
                                <exclusion>
                                                <groupId>concurrent</groupId>
                                                
<artifactId>concurrent</artifactId>
                                </exclusion>
               <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-serialization</artifactId>
                </exclusion>

                <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-jmx</artifactId>
                </exclusion>
                                <exclusion>
                                                <groupId>jboss</groupId>
                                                
<artifactId>jboss-common</artifactId>
                                </exclusion>
                                <exclusion>
                                                <groupId>jboss</groupId>
                                                
<artifactId>jboss-j2ee</artifactId>
                                </exclusion>
                                <exclusion>
                                                <groupId>jboss</groupId>
                                                
<artifactId>jboss-minimal</artifactId>
                                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>jboss-system</artifactId>
                </exclusion>
                </exclusions>

                </dependency>

2. Add  <distributable/> to your web.xml

3. Add the following jboss-web.xml to your WEB-INF dir:
<jboss-web>
    <resource-ref>
        <res-ref-name>jdbc/occamDS</res-ref-name>
        <jndi-name>java:/occamDS</jndi-name>
    </resource-ref>
  <replication-config>
     <replication-granularity>SESSION</replication-granularity>
      <replication-trigger>SET_AND_GET</replication-trigger>
  </replication-config>
</jboss-web>

4. In WEB-INF/spring-configuraion/ticketRegistry.xml, make the following 
replacement.
REPLACE:
<bean
      id="ticketRegistry"
      class="org.jasig.cas.ticket.registry.DefaultTicketRegistry" />

WITH:
        <bean id="ticketRegistry"
              class="org.jasig.cas.ticket.registry.JBossCacheTicketRegistry">
              <property name="cache" ref="cache" />
        </bean>


        <bean id="cache" class="org.jasig.cas.util.JBossCacheFactoryBean">
              <property name="configLocation"
                     value="classpath:jbossTicketCacheReplicationConfig.xml" />
        </bean>

5.  From the source of cas-server-integration-jboss,
rename the file src/test/resources/jbossTestCache.xml to 
jbossTicketCacheReplicationConfig.xml
remark out the following lines:

<depends>jboss:service=TransactionManager</depends>

<attribute 
name="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute>

6. Place the new jbossTicketCacheReplicationConfig.xml into:
        {JBOSS_HOME}/server/all/conf

7. Update your cookie domain
        Take a look at the section "Ensuring Ticket Granting Ticket Cookie 
Visibility" on
        Clustering CAS: http://www.ja-sig.org/wiki/display/CASUM/Clustering+CAS

8. Put your new cas.war into
        {JBOSS_HOME}/server/all/farm
        *Not exploded.  JBOSS needs a war for clustering.

9. Start up with the "all" server config

- Scott


________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Marshall
Sent: Tuesday, April 22, 2008 11:38 AM
To: [email protected]
Subject: Running CAS in a cluster on JBOSS

So I have been reading the “Clustering Cas” page 
(http://www.ja-sig.org/wiki/display/CASUM/Clustering+CAS) and trying to 
implement in a JBOSS environment.

I have tried a various set of configs, but I cannot seems to get the cluster 
working.

Does any have any documentation on deploying a CAS cluster on JBOSS 4?

Thanks in advance,
Scott

________________________________________
Scott Marshall
Director, Operations
SmartTurn Inc.
[EMAIL PROTECTED]
www.smartturn.com

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to