[JBoss Seam] - Re: Getting Started with Seam and Maven / Migrating from Spr
by fabricio.lemos
I have a multi-module project. Here is the plugin configurations of my ear project:
| <build>
| <defaultGoal>cargo:deploy</defaultGoal>
| <plugins>
| <plugin>
| <groupId>org.codehaus.cargo</groupId>
| <artifactId>cargo-maven2-plugin</artifactId>
| <configuration>
| <container>
| <containerId>jboss4x</containerId>
| <type>remote</type>
| </container>
| <configuration>
| <type>runtime</type>
| <properties>
| <cargo.hostname>
| ${remoteServer}
| </cargo.hostname>
| <cargo.servlet.port>
| ${remotePort}
| </cargo.servlet.port>
| <cargo.remote.username>
| ${remoteUsername}
| </cargo.remote.username>
| <cargo.remote.password>
| ${remotePassword}
| </cargo.remote.password>
| </properties>
| </configuration>
| </configuration>
| </plugin>
| <plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-ear-plugin</artifactId>
| <configuration>
| <displayName>Prototipo</displayName>
| <description>Prototipo Seam</description>
| <version>5</version>
| <modules>
| <webModule>
| <groupId>br.gov.serpro.prototipo</groupId>
| <artifactId>cenarios-web</artifactId>
| <contextRoot>/seam-reg</contextRoot>
| </webModule>
| <ejbModule>
| <groupId>br.gov.serpro.prototipo</groupId>
| <artifactId>cenarios-ejb</artifactId>
| </ejbModule>
| <javaModule>
| <groupId>org.jboss.seam</groupId>
| <artifactId>jboss-seam</artifactId>
| <includeInApplicationXml>
| true
| </includeInApplicationXml>
| </javaModule>
| <javaModule>
| <groupId>org.jboss.seam</groupId>
| <artifactId>el-api</artifactId>
| <includeInApplicationXml>
| true
| </includeInApplicationXml>
| </javaModule>
| <javaModule>
| <groupId>org.jboss.seam</groupId>
| <artifactId>el-ri</artifactId>
| <includeInApplicationXml>
| true
| </includeInApplicationXml>
| </javaModule>
| </modules>
| </configuration>
| </plugin>
| </plugins>
| </build>
| <properties>
| <remoteServer>localhost</remoteServer>
| <remotePort>8080</remotePort>
| <remoteUsername>admin</remoteUsername>
| <remotePassword>admin</remotePassword>
| </properties>
|
I did not used any Archetype, so it could be a little different from your configuration.
To deploy the application, run "cargo:deploy" goal.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044303#4044303
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044303
19 years, 1 month
[JBoss Seam] - probelm with asynchronous methods and timers
by frehan
I have a usecase where I want to have a recurring service checking some db information and send out mails i nessesary. I started with a simple scheduled service that worked fine. Then I wanted to use Seam to send out my mails but I got problems with failed rendering because I was outside of the seam context in my scheduled service bean. So I switch to using seam asynchronous methods and timers.
I have a bootstrap action annotated with
@Startup(depends={"org.jboss.core.jndi", "org.jboss.core.jta"})
and then a @Create annotated method to start the asynchronous action with a timer.
The boostrap action is application scoped and stores the timer instance for the duration of the application lifecycle. The timer is destroyed in the @destroy method. When the timer is created it is stored by the application server in the timer db table and removed when the server is stoped or my application undeployed.
Now to the problem :-)
Sometimes the timer is not removed from the db when the server is stopped. Then when I start the server again a new timer is created in my bootstrap action and now I have to timers running making my service run more often then I want.
How can I avoid this problem? Is this the wrong solution for my usecase or can I somehow check for exising timers when bootstrapinig or can I shedule my asynchronous methos in the same way that i schedule my service in a xml file or ... ?
Thankfull for all input!
Best regards Fredrik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044301#4044301
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044301
19 years, 1 month
[Persistence, JBoss/CMP, Hibernate, Database] - How to clean or refresh EJB cache?
by Kentzhou
Hi, I have a Web application use EJB.
UserAccount is a BMP Entity Bean. When user login into the system, web app will put this EJB in session through other session bean.
When user log out, clean web session.
Then change the user account info in database, then login again. The database changes are not loaded into the EJB UserAccount, it including the old data.
Then I need to restart JBOSS, and login again, then I can get the changes of database in EJB.
How to get the changes of database and no need to restart JBOSS?
JBOSS have a good cache for many thing, but I need a way to refresh the cache to get changes in database online.
Help please.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044299#4044299
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044299
19 years, 1 month
[JBossCache] - Re: TreeCache CacheLoader Issue
by bstansberry@jboss.com
Here's your problem:
CacheHelper.getImportCache().get(nodename).put("importTracker", tracker);
Use:
CacheHelper.getImportCache().put(nodename, "importTracker", tracker);
Do the same anywhere else you have the same kind of thing going on.
The 1.x "public Node get(Fqn)" method was a bad idea and is conceptually being completely reworked in JBC 2.0. If you invoke directly on a JBC 1.x Node rather than through the cache, your call bypasses all the interceptors that do stuff like cache loader integration, replication, locking, etc.
To answer your question about having to call put() again if you modify your object, yes you do, unless you prepare your object for JBoss Dynamic AOP and use PojoCache.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044294#4044294
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044294
19 years, 1 month
[JBoss Seam] - Re: Request: Step by Step build it yourself tutorial
by fperedo
Hi!
I agree that configuration is boring.... (that is one of the reasons I think Seam could be more productive than Spring), but after years of development, I feel uneasy to use a technology if I don't feel that I can go somewhere and read a good "map" of "how to deal with the configuration stuff by hand"...
I know that the new trend is to imitate "Ruby on Rails" and have scaffolding and convention over configuration... and that... is great for new projects... but in my experience... one has to deal alot with existing projects, existing configuration, existing application servers... one of the reasons I love hibernate is because it "plays well with others", I can map my POJO to pretty much any old and badly designed database...
I like Spring because I can be used pretty much anywhere...
And I like Seam... because I just love the bijection idea... and the fact that I can "configure" it with almost no XML (unlike spring)
I was ready to accept the fact that Seam is for EE5 or later versions (so it won't run everywhere), but then I read that I can be run in tomcat... so... if it can run in tomcat... it should be posible to use it pretty much in any container (as long as it runs in JDK1.5 or later), but I feel that an example showing how to do that, step by step, is just missing...
I do believe that one of Seam advantages is that "configuration" is not as verbose as in Spring... but it while it is less verbose... it is either more complex... or less explained...
Convention over configuration is a good idea... but only if that convention is clearly documented... and if configuration can be enabled for special (or not so special) cases...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044285#4044285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044285
19 years, 1 month