[JBoss Portal] - Portal 2.6.2 + Cluster + CAS = Not Working ; -)
by Soon5
Hy There,
I am testing with a CAS Server in a Clustered environment. First I tried to setup the HA Version of Portal 2.6.2 and access the same CAS Server with both portals. I got errors, and wrote that in an other Subject. In that Subject I was told, that currently Portal and CAS Server have to run on the same JBoss.
My second try was, to setup two CAS Servers, one on each of my two portal nodes and configure each Portal to use the local CAS Server. When I try this, I get exceptions because the org.jboss.portal.identity.sso.cas.CASAuthenticationValve tries to set a non Serializable Object Attribute (which can't be session-replicated):
| 08:18:30,203 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
| java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
| at org.jboss.web.tomcat.service.session.ClusteredSession.setAttribute(ClusteredSession.java:535)
| at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
| at org.jboss.portal.identity.sso.cas.CASAuthenticationValve.invoke(CASAuthenticationValve.java:320)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
| at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:381)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
|
I just assume, that currently Portal is not able to handle both, CAS and Clustering at once.
Greetings Soon5
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116615#4116615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116615
18 years, 3 months
[JBoss Seam] - Re: Maven2 example application for Seam2
by cory_prowse
"pete.muir(a)jboss.org" wrote : there is nothing wrong with Seam or Embedded here, just the way Maven sets up the classpath when running tests.
Aha!
The problem then appears to be with the thirdparty-all-beta*.jar file as it contains a separate copy of javassist.
Adding an exclusion for javassist to jboss-seam and hibernate-entitymanager in the Ejb's POM as follows:
<dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| <exclusions>
| <exclusion>
| <groupId>jboss</groupId>
| <artifactId>javassist</artifactId>
| </exclusion>
| </exclusions>
| </dependency>
| ...
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-entitymanager</artifactId>
| <exclusions>
| <exclusion>
| <groupId>jboss</groupId>
| <artifactId>javassist</artifactId>
| </exclusion>
| </exclusions>
| </dependency>
causes the tests to now fail with:
ERROR [AbstractKernelController] Error installing to Start: name=java:comp state=Create
| javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.naming.JavaCompInitializer.start(JavaCompInitializer.java:83)
So it appears the dependencies need to be properly and fully speced out in the appropriate poms.
The use of these "*-all-*.jar" files appear the be the culprit.
Namely:
hibernate-all-*.jar
| jboss-embedded-all-*.jar
| thirdparty-all-*.jar
|
| These are not very useful in their current form for Maven.
|
| Unless someone knows of a way to exclude certain dependencies in the test scope within maven? (I can't see a way)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116610#4116610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116610
18 years, 3 months
[JBoss Seam] - Ending Parent Conversation
by mindgame
Dear all,
consider the following scenario. Conversation A has multiple nested conversations, represented by 'An' (where n is an integer), (e.g, A1, A2, A3, ...)
Is there a way to end conversation A directly without having to end all nested conversation individually?
What I want to achieve is to end conversation A, which at the same time end all of its nested conversations (A1, A2, ...). Instead of the other way around.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116608#4116608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116608
18 years, 3 months
[EJB 3.0] - Re: EntityManager not auto-flushing at end of SLSB method
by mazz@jboss.com
For sure you need to do the merge there (or a em.persist - em.merge is for overwriting data on a possibly existing entity -I suspect you really want to do em.persist here).
Just "new MyEntity()" doesn't really do anything - there is no magic here for your entity manager to know that object exists. You need to put it in the JPA session - the only way for that to happen is to load it into the entity manager, either by asking the entity manager to persist/merge it (if it isn't in the DB yet or you want to overwrite it) or to find/load it (if it already exists in the DB) Once the object is "attached" to the entity manager, THEN the magic happens (since its at that point the entity manager knows about your object and can manage it).
I don't know much about SEAM, but it sounds like the injected entity POJO isn't attached yet. It sounds like its the same as if you passed in the entity from a remote client (which, it too, would not be attached).
If you get passed an entity that you know already exists, to load it into your entity manager:
public mySLSBMethod( MyEntity myentity ) {
// attach myentity to the entity manager
myentity = entityManager.find(MyEntity.class, myentity.getId());
I tend to only pass primary keys around, especially for APIs that I want my remote clients to use:
public mySLSBMethod( int myentityId ) {
MyEntity me = entityManager.find(MyEntity.class, myentityId);
That's one way to load it - another way is to load it is via a named query. Once loaded, now anything you do to myentity will be tracked and when the entity manager is flushed, those changes make its way to the DB.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116602#4116602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116602
18 years, 3 months