[JBoss Seam] - Re: Seam 2.0.0.0GA + Maven2 doesn`t work...
by w17chm4n
I`ve managed to deal with building Seam 2.0 application without exclusions.
main project pom
| <?xml version="1.0" encoding="UTF-8"?>
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
| <modelVersion>4.0.0</modelVersion>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>Inquisitor</artifactId>
| <packaging>pom</packaging>
| <version>1.0-SNAPSHOT</version>
| <name>Inquisitor</name>
| <repositories>
| <repository>
| <id>JBossMaven2Repository</id>
| <name>JBoss Maven2 Repository</name>
| <url>http://repository.jboss.com/maven2</url>
| </repository>
| </repositories>
| <dependencyManagement>
| <dependencies>
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| <version>2.0.0.GA</version>
| </dependency>
| </dependencies>
| </dependencyManagement>
| <build>
| <plugins>
| <plugin>
| <artifactId>maven-compiler-plugin</artifactId>
| <configuration>
| <fileName>ear/target/Inquisitor.ear</fileName>
| <source>1.5</source>
| <target>1.5</target>
| </configuration>
| </plugin>
| </plugins>
| </build>
| <modules>
| <module>webapp</module>
| <module>ejb3</module>
| <module>ear</module>
| </modules>
| </project>
|
war
| <?xml version="1.0"?><project>
| <parent>
| <artifactId>Inquisitor</artifactId>
| <groupId>com.blstream.inquisitor</groupId>
| <version>1.0-SNAPSHOT</version>
| </parent>
| <modelVersion>4.0.0</modelVersion>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>webapp</artifactId>
| <packaging>war</packaging>
| <name>Inquisitor::${artifactId}</name>
| <version>${pom.parent.version}</version>
| <build>
| <finalName>webapp</finalName>
| </build>
| <repositories>
| <repository>
| <id>JBossMaven2Repository</id>
| <name>JBoss Maven2 Repository</name>
| <url>http://repository.jboss.com/maven2</url>
| </repository>
| </repositories>
| <dependencies>
| <dependency>
| <groupId>junit</groupId>
| <artifactId>junit</artifactId>
| <version>3.8.1</version>
| <scope>test</scope>
| </dependency>
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam-debug</artifactId>
| <version>2.0.0.GA</version>
| </dependency>
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam-ui</artifactId>
| <version>2.0.0.GA</version>
| </dependency>
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-el</artifactId>
| <version>2.0.0.GA</version>
| <scope>provided</scope>
| </dependency>
| <dependency>
| <groupId>javax.el</groupId>
| <artifactId>el-api</artifactId>
| <version>1.0</version>
| <scope>provided</scope>
| </dependency>
| <dependency>
| <groupId>javax.faces</groupId>
| <artifactId>jsf-api</artifactId>
| <version>1.2_04-p02</version>
| <scope>provided</scope>
| </dependency>
| </dependencies>
| </project>
|
EJB
| <?xml version="1.0"?><project>
| <parent>
| <artifactId>Inquisitor</artifactId>
| <groupId>com.blstream.inquisitor</groupId>
| <version>1.0-SNAPSHOT</version>
| </parent>
| <modelVersion>4.0.0</modelVersion>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>ejb3</artifactId>
| <packaging>ejb</packaging>
| <name>Inquisitor::${artifactId}</name>
| <version>${pom.parent.version}</version>
| <repositories>
| <repository>
| <id>JBossMaven2Repository</id>
| <name>JBoss Maven2 Repository</name>
| <url>http://repository.jboss.com/maven2</url>
| </repository>
| </repositories>
| <build>
| <finalName>ejb3</finalName>
| </build>
| <modules>
| <javaModule>jboss-seam-2.0.0.GA</javaModule>
| <javaModule>jboss-el-2.0.0.GA</javaModule>
| </modules>
| <dependencies>
| <dependency>
| <groupId>junit</groupId>
| <artifactId>junit</artifactId>
| <version>3.8.1</version>
| <scope>test</scope>
| </dependency>
| <dependency>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| </dependency>
| <dependency>
| <groupId>org.jboss.javaee</groupId>
| <artifactId>jboss-ejb-api</artifactId>
| <version>3.0.0.20070913080910</version>
| </dependency>
| <dependency>
| <groupId>javax.persistence</groupId>
| <artifactId>persistence-api</artifactId>
| <version>1.0</version>
| </dependency>
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-validator</artifactId>
| <version>3.0.0.GA</version>
| </dependency>
| </dependencies>
| </project>
|
EAR
| <?xml version="1.0"?><project>
| <parent>
| <artifactId>Inquisitor</artifactId>
| <groupId>com.blstream.inquisitor</groupId>
| <version>1.0-SNAPSHOT</version>
| </parent>
| <modelVersion>4.0.0</modelVersion>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>ear</artifactId>
| <packaging>ear</packaging>
| <name>Inquisitor::${artifactId}</name>
| <version>${pom.parent.version}</version>
| <dependencies>
| <dependency>
| <groupId>junit</groupId>
| <artifactId>junit</artifactId>
| <version>3.8.1</version>
| <scope>test</scope>
| </dependency>
| <dependency>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>ejb3</artifactId>
| <version>${pom.parent.version}</version>
| <type>ejb</type>
| </dependency>
| <dependency>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>webapp</artifactId>
| <version>${pom.parent.version}</version>
| <type>war</type>
| </dependency>
| </dependencies>
| <build>
| <plugins>
| <plugin>
| <artifactId>maven-ear-plugin</artifactId>
| <configuration>
| <modules>
| <ejbModule>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>ejb3</artifactId>
| </ejbModule>
| <javaModule>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| <includeInApplicationXml>true</includeInApplicationXml>
| </javaModule>
| <javaModule>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-el</artifactId>
| <includeInApplicationXml>true</includeInApplicationXml>
| </javaModule>
| <webModule>
| <groupId>com.blstream.inquisitor</groupId>
| <artifactId>webapp</artifactId>
| <contextRoot>inquisitor</contextRoot>
| </webModule>
| </modules>
| </configuration>
| </plugin>
| </plugins>
| <finalName>Inquisitor</finalName>
| </build>
| </project>
|
So now application builds and deploys smoothly but I`ve encountered another problem. There are no seam components which I`ve created in ANY scope.
Example:
questioncategory.xml
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib">
| <body>
|
| <h:form>
| <h:inputText value="#{QuestionCategory.categoryName}" required="true"/>
| <h:outputText value="categoryList is null" rendered="#{questionCategoryList == null}"/><br/>
| <h:outputText value="categoryList rowCount = 0" rendered="#{questionCategoryList.size == 0}"/><br/>
| <h:outputText value="Available categoryList: " rendered="#{questionCategoryList.size > 0}"/><br/>
| <h:commandButton type="submit" value="Add new category" action="#{QuestionCategoryController.addCategory}"/><br/>
| <h:dataTable var="cat" value="#{questionCategoryList}">
| <h:column>
| <h:outputText value="[ #{cat.categoryName} ]"/>
| </h:column>
| <h:column>
| <h:outputText value=" - [ #{cat.created} ]"><s:convertDateTime pattern="MM/dd/yyyy"/></h:outputText>
| </h:column>
| <h:column>
| <s:link value="remove" action="#{QuestionCategoryController.removeCategory}"/>
| </h:column>
| <h:column>
| <s:link value="select" action="#{QuestionCategoryController.selectCategory(cat)}"/>
| </h:column>
| </h:dataTable>
| </h:form>
|
| <ui:debug hotkey="d"/>
|
| </body>
| </html>
|
QuestionCategoryController
| @Stateful
| @Scope(ScopeType.SESSION)
| @Name("QuestionCategoryController")
| public class QuestionCategoryControllerBean implements QuestionCategoryController {
|
| @Logger
| private Log log;
|
| @In(create = true)
| private QuestionCategoryManager questionCategoryManager;
|
| @DataModel
| private List<QuestionCategory> questionCategoryList;
|
| @In(create = true)
| @DataModelSelection
| private QuestionCategory questionCategory;
|
| public void addCategory() {
| log.info("Adding category [#{questionCategory.categoryName}]");
| questionCategoryManager.addCategory(questionCategory);
| getAllQuestionsCategories();
| }
|
| public void removeCategory() {
| questionCategoryList.remove(questionCategory);
| questionCategoryManager.removeCategory(questionCategory);
| questionCategory = null;
| getAllQuestionsCategories();
| }
|
| public void selectCategory(QuestionCategory category) {
| questionCategory = category;
| }
|
| @Factory(value="questionCategoryList")
| public void getAllQuestionsCategories() {
| questionCategoryList = questionCategoryManager.getAllQuestionCategories();
| }
|
| @Remove @Destroy
| public void destroy() {}
|
| }
|
QuestionCategory entity
| @Entity
| @Scope(ScopeType.EVENT)
| @Name("questionCategory")
| @Table(name="QuestionCategories")
| public class QuestionCategory implements Serializable {
|
| @Id @GeneratedValue
| private Long id;
|
| @NotNull @Length(min=3, max=100)
| private String categoryName;
|
| @OneToMany
| private List<Question> questionList;
|
| @Temporal(value = TemporalType.TIMESTAMP)
| private Date created;
|
| @Override
| public boolean equals(Object obj) {
| if (!(obj instanceof QuestionCategory) || this.id == null) {
| return false;
| }
|
| return this.id.equals(((QuestionCategory)obj).getId());
| }
|
| public QuestionCategory() {
| this.questionList = new ArrayList<Question>();
| }
|
| public QuestionCategory(String categoryName) {
| this.categoryName = categoryName;
| this.questionList = new ArrayList<Question>();
| }
|
| public Long getId() {
| return id;
| }
|
| public void setId(Long id) {
| this.id = id;
| }
|
| public String getCategoryName() {
| return categoryName;
| }
|
| public void setCategoryName(String categoryName) {
| this.categoryName = categoryName;
| }
|
| public List<Question> getQuestionList() {
| return questionList;
| }
|
| public void setQuestionList(List<Question> questionList) {
| this.questionList = questionList;
| }
|
| public Date getCreated() {
| return created;
| }
|
| public void setCreated(Date created) {
| this.created = created;
| }
| }
|
...I don`t have to say that this code works on Seam 1.2.1 -_- ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104003#4104003
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104003
18 years, 8 months
[JBoss Portal] - Half working SSO with Portal 2.6.2
by Soon5
Hy there,
I'm currently trying to develop an SSO System. I want to use a CAS Server for SSO. So I upgraded my Portal 2.6.1 to 2.6.2 because 2.6.2 comes with CAS out of the box. I am running on JBoss AS 4.2.1.
I set up the CAS Authentication like described in Chapter 19 in den Portal 2.6.2 reference Manual. Everything fine so far.
When I login to the Portal, I am redirected to the CAS loginpage, where I can use my Portal Account.
So why do I post this, when everything seams fine? Here are the Problems.
1. I got the logout Problem, already described here in the forum somewhere. When I press logout, I got logged out, but my ticket isn't invalidatet (so I can login immediately without typing in my uname / password). Is there already a solution found?
2. When I logged in, and I open a second Browser Window and want to log into a second instance of the Portal, I have to type in my Username / Password again. Not realy SSO ;-). Or is it normal, that I have to log in for each Browser Window?
Greetings from the snow covered South of Germany
Arne Luedtke
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104002#4104002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104002
18 years, 8 months
[JBoss jBPM] - JBPM 3.2.2 and DB2 V8.1
by JavaSpaceMarine
Hi everybody,
We use db2 db and at moment we evaluate jbpm 3.2.2.
But there are errors in the lock.
it seems that db2 does not like index longer then 18 characters.
jbpm 3.1.3 still work.
Does someone knows any workaround ?
10:59:13,561 [main] ERROR SchemaExport : Unsuccessful: create index IDX_PSTATE_SBPRCDEF on ENGPADM.JBPM_NODE (SUBPROCESSDEFINITION_)
10:59:13,561 [main] ERROR SchemaExport : [IBM][CLI Driver][DB2/NT] SQL0107N Der Name "IDX_PSTATE_SBPRCDEF" ist zu lang. Die maximale Länge beträgt "18". SQLSTATE=42622
10:59:14,718 [main] ERROR SchemaExport : Unsuccessful: create index IDX_VARINST_TKVARMP on ENGPADM.JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
10:59:14,718 [main] ERROR SchemaExport : [IBM][CLI Driver][DB2/NT] SQL0107N Der Name "IDX_VARINST_TKVARMP" ist zu lang. Die maximale Länge beträgt "18". SQLSTATE=42622
Timo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103997#4103997
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103997
18 years, 8 months
[JBossCache] - JBC 1.4.1SP replication problems
by jorgemoralespou_2
Hi,
We have a two node cluster configured with replication and a JDBCCacheLoader, as follows:
| <server>
| <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
|
| <mbean code="org.jboss.cache.TreeCache"
| name="jboss.cache:service=SOMServicesProvisioningCache">
|
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
| <depends>jboss.jca:name=jdbc/somservices,service=DataSourceBinding</depends>
|
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| <attribute name="CacheMode">REPL_SYNC</attribute>
| <attribute name="UseReplQueue">false</attribute>
| <attribute name="ReplQueueInterval">0</attribute>
| <attribute name="ReplQueueMaxElements">0</attribute>
| <attribute name="ClusterName">SOMServicesProvisioning-Cluster</attribute>
|
| <attribute name="ClusterConfig">
| ....
| </attribute>
|
| <attribute name="FetchInMemoryState">true</attribute>
| <attribute name="InitialStateRetrievalTimeout">15000</attribute>
| <attribute name="SyncReplTimeout">15000</attribute>
|
| <attribute name="LockAcquisitionTimeout">10000</attribute>
| <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">10</attribute>
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">10000</attribute>
| <attribute name="timeToLiveSeconds">86400</attribute>
| </region>
| </config>
| </attribute>
|
| <attribute name="UseRegionBasedMarshalling">true</attribute>
| <attribute name="CacheLoaderConfiguration">
| <config>
| <passivation>false</passivation>
| <preload>/</preload>
| <shared>true</shared>
| <cacheloader>
| <class>org.jboss.cache.loader.JDBCCacheLoader</class>
| <properties>
| cache.jdbc.datasource=java:jdbc/somservices
| cache.jdbc.table.name=services_provisioning
| cache.jdbc.table.create=true
| cache.jdbc.table.drop=false
| cache.jdbc.table.primarykey=jbosscache_pk
| cache.jdbc.fqn.column=fqn
| cache.jdbc.fqn.type=varchar(255)
| cache.jdbc.node.column=node
| cache.jdbc.node.type=blob
| cache.jdbc.parent.column=parent
| </properties>
| <async>true</async>
| <fetchPersistentState>true</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| </cacheloader>
| </config>
| </attribute>
|
| </mbean>
| </server>
|
We are having strange behaviour:
We stop one cluster node.
We modify one JBC node`s attribute.
We start the other node of the cluster.
We expect here to have the correct value, but we have the previously value, I guess that retrieved from Database. We supposed this value was updated when we did a put in the cache, and also that values should be retrieved first from the other node in the cluster, and then, if nothing found, from database.
Replication seems to be working, because if we programatically stop a region`s synchronization, and put values in that region, when we start that region`s synchronization again, all values are replicated correctly.
What are we doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103994#4103994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103994
18 years, 8 months
[JBoss Seam] - Using Ajax4JSF reRender inside a loop (ui:repeat or a4j:repe
by erik.d.hellman@gmail.com
I have a loop in my JSF page generated with ui:repeat. Inside that loop I have a h:selectOneMenu with a a4j:support side it. I also have a a4j:outputPanel inside the loop. My question is how I can make my selectOneMenu trigger a reRender of the correct a4j:outputPanel. I tried setting the id and reRender attributes of the a4j:outputPanel and a4j:support to the id of the entities I iterate over, but that doesn't work.
The code looks something like this:
<ui:repeat var="dayTime" value="#{planWorkBean.dayTimes}">
| <h:selectOneMenu value="#{dayTime.workShift}">
| <s:selectItems value="#{workShifts}" var="workShift" label="#{workShift.name}" noSelectionLabel="-" />
| <s:convertEntity />
| <a4j:support action="#{dayTime.setWorkShift(workShift)}" event="onchange" reRender="#{dayTime.id}" />
| <h:selectOneMenu>
|
| <a4j:outputPanel id="#{dayTime.id}">
| <h:outputText value="#{dayTime.workShift.totalTime}" converter="HourMinuteConverter" />
| </a4j:outputPanel>
| </ui:repeat>
Everything but the reRendering works great. The entity is updated at the onchange event, but the a4j:outputPanel is not updated.
I guess I can't use EL-expressions for the id-attribute in JSF-tags, but how else am I supposed to refer to the correct a4j:outputPanel?
Thanks,
Erik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103991#4103991
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103991
18 years, 8 months