[JBossCache] - PojoCache 2.0: New tree structure, optimistic locking & conc
by chasta
Hi,
I'm experiencing a problem which I believe might be related to the new tree structure in PojoCache (i.e., the structure that enables canonical locking). It seems that when using optimistic locking, since attaching an object to the PojoCache will cause a version increment on __JBossInternal__, any concurrent transaction to one that attaches an object (even one that is seemingly unrelated and deals with completely different objects) will fail.
Consider the following code, out of a small unit test I've created for the purpose ("cache" was configured to use optimistic locking):
| UserTransaction tx = getTransaction();
| tx.begin();
|
| FamilyPerson father = createFamilyPerson("Rafael Gallardo", 55);
| cache.attach("/person/test1/father", father);
|
| Thread otherThread = new Thread () {
| public void run ()
| {
| FamilyPerson otherPerson = createFamilyPerson("Katherine Brendel", 24);
| cache.attach("/other_person/test/1", otherPerson); // auto transactional commit (optimistic locking mode)
| }
| };
|
| // Start the other thread and make sure it finishes before we commit
| otherThread.start();
| otherThread.join();
|
| tx.commit() // Fails (RollbackException)
|
What's your opinion? Is my suspicion correct? Is this a known issue (I didn't find it in JBoss.org JIRA), or perhaps the intended behaviour?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995316#3995316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995316
19 years, 4 months
[JBoss Seam] - Re: Internatinalization: messages only default messages.prop
by rengar
Already work!!
But when change language in other action in the same page catch old language, that have it before, with method "Locale.instance().getLanguage()"
I explain :
1º Default "es" -> Combox "español", messages_es, Locale.instance().getLanguage() = "es"
2º Change "en" -> Combox "English", messages_en, Locale.instance().getLanguage() = "es"
3º Change "es" -> Combox "español", messages_es, Locale.instance().getLanguage() = "en"
4º Change "en" -> Combox "English", messages_en, Locale.instance().getLanguage() = "es"
.
.
.
.
How change language before enter in my action?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995315#3995315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995315
19 years, 4 months
[JBoss Seam] - Re: Seam & Maven2
by denis-karpov
I am extremely happy to see a serious interest in the maven2 integration.
I am also confident that Gavin will love this ;-)
I am not sure that it is something new for you people. May be it will be helpful.
This is the POM I have used for building SEAM 1.1.1.BETA2
POM.XML
<?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>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| <packaging>jar</packaging>
| <version>1.1.0.BETA2</version>
| <description>qqq</description>
| <dependencies>
| <!--dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernateAll</artifactId>
| <version>SEAM.1.1.0.BETA2</version>
| </dependency-->
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate</artifactId>
| <version>3.2.0.ga</version>
| </dependency>
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-annotations</artifactId>
| <version>3.2.0.ga</version>
| </dependency>
| <dependency>
| <groupId>org.hibernate</groupId>
| <artifactId>hibernate-entitymanager</artifactId>
| <version>3.2.0.ga</version>
| </dependency>
| <dependency>
| <groupId>org.jboss.ejb3</groupId>
| <artifactId>jboss-ejb3-all</artifactId>
| <version>SEAM.1.1.0.BETA2</version>
| </dependency>
| <dependency>
| <groupId>org.jboss.jbpm</groupId>
| <artifactId>jbpm</artifactId>
| <version>3.1.2</version>
| </dependency>
| <dependency>
| <groupId>org.jboss.drools</groupId>
| <artifactId>drools-core</artifactId>
| <version>3.0.1</version>
| </dependency>
| <dependency>
| <groupId>org.jboss.drools</groupId>
| <artifactId>drools-compiler</artifactId>
| <version>3.0.1</version>
| </dependency>
| <dependency>
| <groupId>org.jboss.cache</groupId>
| <artifactId>jboss-cache</artifactId>
| <version>SEAM.1.1.0.BETA2</version>
| </dependency>
| <dependency>
| <groupId>javax.portlet</groupId>
| <artifactId>portlet-api</artifactId>
| <version>1.0</version>
| </dependency>
| <dependency>
| <groupId>org.testng</groupId>
| <artifactId>testng</artifactId>
| <classifier>jdk15</classifier>
| <version>5.1</version>
| </dependency>
| <dependency>
| <groupId>log4j</groupId>
| <artifactId>log4j</artifactId>
| <version>1.2.13</version>
| </dependency>
| <dependency>
| <groupId>commons-logging</groupId>
| <artifactId>commons-logging</artifactId>
| <version>1.1</version>
| </dependency>
| <dependency>
| <groupId>commons-collections</groupId>
| <artifactId>commons-collections</artifactId>
| <version>3.2</version>
| </dependency>
| <dependency>
| <groupId>org.apache.myfaces.core</groupId>
| <artifactId>myfaces-api</artifactId>
| <version>1.1.4</version>
| </dependency>
| <dependency>
| <groupId>javax.el</groupId>
| <artifactId>el-api</artifactId>
| <version>1.2</version>
| </dependency>
| <dependency>
| <groupId>javax.el</groupId>
| <artifactId>el-ri</artifactId>
| <version>1.2</version>
| </dependency>
| <dependency>
| <groupId>javax.servlet</groupId>
| <artifactId>jstl</artifactId>
| <version>1.1.2</version>
| </dependency>
| <dependency>
| <groupId>javax.servlet</groupId>
| <artifactId>servlet-api</artifactId>
| <version>2.5</version>
| </dependency>
| </dependencies>
| <build>
| <plugins>
| <plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-compiler-plugin</artifactId>
| <version>2.0</version>
| <configuration>
| <source>1.5</source>
| <target>1.5</target>
| </configuration>
| </plugin>
| </plugins>
| <outputDirectory>target/jboss-seam.jar</outputDirectory>
| </build>
| </project>
And this is files that I have to put in my local repository.
mvn install:install-file -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\jboss-ejb3-all.jar -DgroupId=org.jboss.ejb3 -DartifactId=jboss-ejb3-all -Dversion=SEAM.1.1.0.BETA2 -Dpackaging=jar
|
| mvn install:install-file -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\jbpm-3.1.2.jar -DgroupId=org.jboss.jbpm -DartifactId=jbpm -Dversion=3.1.2 -Dpackaging=jar
|
| mvn install:install-file -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\drools\lib\drools-core-3.0.3.jar -DgroupId=org.jboss.drools -DartifactId=drools-core -Dversion=3.0.3 -Dpackaging=jar
|
| mvn install:install-file -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\drools\lib\drools-compiler-3.0.3.jar -DgroupId=org.jboss.drools -DartifactId=drools-compiler -Dversion=3.0.3 -Dpackaging=jar
|
| mvn install:install-file
| -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\jboss-cache-jdk50.jar
| -DgroupId=org.jboss.cache -DartifactId=jboss-cache
| -Dversion=SEAM.1.1.0.BETA2 -Dpackaging=jar
|
| mvn install:install-file -Dfile=c:\javaprogs\new\hibernate-3.2\lib\jta.jar
| -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B
| -Dpackaging=jar
|
| mvn install:install-file
| -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\el-api.jar
| -DgroupId=javax.el -DartifactId=el-api -Dversion=1.2 -Dpackaging=jar
|
| mvn install:install-file
| -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\el-ri.jar
| -DgroupId=javax.el -DartifactId=el-ri -Dversion=1.2
| -Dpackaging=jar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995313#3995313
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995313
19 years, 4 months
[JBoss Portal] - Re: aplication on portlet
by mare
Hello!
I have s similar problem: I have JSF web aplication and I want to run it as portlet. I'm using jboss AS 4.0.5GA, jboss portal 2.4, java 1.5. Also, my aplication uses EJB3. I don't know how to deploy it on AS. I put the portlet aplication in war-file and that war-file together with persistence.jar-file in ear-file. Is that right? When I try to access aplication through portal, portlet window is shown but it says: Cannot render, Object not found /Obrazac5x5Portlet.Obrazac5x5Portlet. Obrazac5x5Portlet is the name of my portlet.
Is there anybody who can help me? Maybe some link...
Here are descriptors:
portal.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| version="1.0">
| <portlet>
| <portlet-name>Obrazac5x5Portlet</portlet-name>
| <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-class>
| <init-param>
| <name>ViewPage</name>
| <value>/WEB-INF/pages/form.jsp</value>
| </init-param>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <title>Obrazac 5x5 Portlet</title>
| </portlet-info>
| </portlet>
| </portlet-app>
|
-object.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <deployments>
| <deployment>
| <if-exists>overwrite</if-exists>
| <parent-ref>default</parent-ref>
| <properties />
| <page>
| <page-name>Obrazac 5x5</page-name>
| <properties />
| <window>
| <window-name>Obrazac5x5PortletWindow</window-name>
| <instance-ref>Obrazac5x5PortletInstance</instance-ref>
| <region>center</region>
| <height>0</height>
| </window>
| </page>
| </deployment>
| </deployments>
portlet-instances.xml
<?xml version="1.0" standalone="yes"?>
| <deployments>
| <deployment>
| <instance>
| <instance-id>Obrazac5x5PortletInstance</instance-id>
| <portlet-ref>Obrazac5x5Portlet</portlet-ref>
| <component-ref>Obrazac5x5Portlet.Obrazac5x5Portlet</component-ref>
| </instance>
| </deployment>
| </deployments>
|
jboss-app.xml
<jboss-app>
| <app-name>Obrazac5x5Portlet</app-name>
| <loader-repository>
| seam.jboss.org:loader=seam-booking
| </loader-repository>
| </jboss-app>
Thanks,
mare
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995311#3995311
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995311
19 years, 4 months