[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Proper location of SqlResultSetMapping
Hi, I wonder what should be the location of @SqlResultSetMapping( | name = kladrRS, | columns = { | @ColumnResult(name = name), | @ColumnResult(name = socr), | @ColumnResult(name = code) | } | ) annotation, so that JPA would find it? In case I put it to one of the Entities JPA founds it all right, but logically it belongs to some action class which doesn't have @Entity annotation. Can anyone suggest where should I put this annotation and how can I make JPA find it? Thanks a lot, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4205287#4205287 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4205287 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB/JBoss] - Advice on Transaction Demarcation needed
Hi all, There is an MDB. It calls a facade method on some SLSB and in case exception happens it catches it and sends a JMS Message (we're using standalone ActiveMQ). The pesky problem is that the message is not sent because the current transaction is in the rolling back state. It seems I need to use a separate transaction for sending message. I tried using @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) | public void sendStatusMessage(String messageText, Destination dest) throws JMSException { unfortunately it doesn't work. If the facade method rolls back its transaction the activeMQ transaction also fails. Can anybody suggest the solution? Thanks, Ivan View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4181698#4181698 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4181698 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - SLSB basic design question
Hi, There is an SLSB. It has a facade method. Which calls private methods of the same SLSB. How can I pass parameters to those private methods? Via method declaration? Or can I use private fields? Like that: public class SLSB { | | int v1; | | void facade(int var) { | v1 = var; | call_internal(); | } | | void call_internal() { | use(v1); | } | } | Which way is preferred? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4171091#4171091 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171091 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: SLSB basic design question
PeterJ wrote : With an SLSB multiple threads can be using it simultaneously Huh??? What about SLSB pools then? I was sure that a thread takes SLSB instance from the POOL, executes it and returns it back for later use. Never two threads execute on the same SLSB instance. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4171099#4171099 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171099 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: SLSB basic design question
ALRubinger wrote : SLSBs *do* have state, as the instance is returned to the Pool after use. Therefore invocation-specific data should not be kept in instance members of a SLSB. Thanks, Andrew. This makes good sense. However, if I only run one single facade method, and previous old state doesn't bug me (all variables are re-initialized before used), can such temporal use of fields be justified? Imagine I have a chain of methods inside a SLSB. a calls b, b calls c, c calls d, etc. Facade method receives a parameter. I need to use that parameter down the chain of execution. Should I put that parameter in each method declaration? Ouch ... Doesn't look very appealing, don't you think? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4171104#4171104 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171104 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - DDL statement inside a transaction (mysql)
Hi, There is a transactional SLSB method that uses EntityManager. It does some business logic, and on its finish all DB changes should be made persistent or rolled back. The problem is that along the way some DDL statements must also be executed. And MySQL cannot execute those statements inside the same SQL transaction, forcing to commit all outstanding changes. http://dev.mysql.com/doc/refman/5.0/en/implicit-commit.html I tried to workaround the problem, issuing DLL statements inside a new transaction, like this: @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) | public int ddl(String ddl) { | log.warn(DDL is #0, ddl); | return entityManager.createNativeQuery(ddl).executeUpdate(); | } | But in spite of REQUIRES_NEW attribute all previous changes of *parent* transaction are also made persistent. Can you suggest what might be the problem? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4171107#4171107 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171107 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: SLSB basic design question
Thanks for sharing your insights on this issue! ALRubinger wrote : Sure, but you've set up a maintenance gotcha that is pretty easy to violate and will be difficult to debug. Also, you'll be less likely to see the inconsistencies exhibited in development, meaning it's likely that Peter's weird stuff will happen in Production. So as a general rule, I'd avoid this paradigm Agreed. I don't like it either. That's why I brought it up ) anonymous wrote : | unless you can say: | 1) There's no cleaner way | Before asking this question I thought of two, you introduced the third, and now I don't like any of them ) anonymous wrote : | 2) Document the hell out of it to make sure the instance var is cleansed upon each invocation | Good point. anonymous wrote : | No, cluttered APIs are not pretty, though this approach *is* pretty foolproof. | Ugly or fragile? That is the question. anonymous wrote : | You can also look into: | 1) Store that parameter in a ThreadLocal | 2) Each method looks to the ThreadLocal for the value | 3) Apply an interceptor to, after invocation, clear the value of the ThreadLocal (as the Thread will also be returned to a pool). | Looks kinda the same as our discussed approach, only you have to clean a single variable. To make sure that variables are clean I can devote a special init() method for that, and call it each time inside my business methods. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4171114#4171114 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171114 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: workaround for StackOverflow exception
anonymous wrote : Pure jBPM should work, or even in combination with Seam. Just configure jBPM to not participate in an already running transaction It is kind of confusing to distinguish jBPM transactions from Seam + EJB3-JPA. I thought jBPM doesn't meddle with application level transactions, only with it's own state persisting. I've tried removing this line from jbpm.cfg.xml service name=tx factory=org.jbpm.tx.TxServiceFactory / But get this exception 13:43:34,852 ERROR [Services] problem closing service 'persistence' | org.jbpm.JbpmException: no jbpm tx service configured | at org.jbpm.persistence.db.DbPersistenceService.isRollbackOnly(DbPersistenceService.java:395) | at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:202) | at org.jbpm.svc.Services.close(Services.java:225) | at org.jbpm.JbpmContext.close(JbpmContext.java:139) | at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:262) | at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:72) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:597) | at org.jboss.seam.util.Reflections.invoke(Reflections.java:21) | at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125) | at org.jboss.seam.Component.callComponentMethod(Component.java:2092) | at org.jboss.seam.Component.callCreateMethod(Component.java:2015) | at org.jboss.seam.Component.newInstance(Component.java:1976) | at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) | at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) | at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95) | at org.jboss.seam.init.Initialization.init(Initialization.java:596) | at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34) | at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856) | at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361) | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790) | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770) | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:597) | at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296) | at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) | at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:597) | at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296) | at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) | at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301) | at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104) | at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375) | at org.jboss.web.WebModule.startModule(WebModule.java:83) | at org.jboss.web.WebModule.startService(WebModule.java:61) | at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) | at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) | at sun.reflect.GeneratedMethodAccessor1376.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:597) | at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) | at
[jboss-user] [JBoss jBPM] - Re: workaround for StackOverflow exception
Thanks for your advice, I won't :) Let me not report any dumps so far, cause I don't quite get the picture of how to save the process state to DB with minimum time expense. From what I can tell so far, I cannot use State node without some external signal that would wake it up. Luckily I've come across this thread, http://www.jboss.com/index.html?module=bbop=viewtopicp=4150584#4150584, which gave me the idea of considering using timers. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170037#4170037 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170037 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: workaround for StackOverflow exception
Here is what I've tried: state name=state2 | timer duedate=1 seconds transition=check more banners | action class=com.agava.cbn.ods.action.SimpleStateHandler/action | /timer | /state Not the best solution, but I thought I'd do the trick. Unfortunately there is another problem, now in Seam: https://jira.jboss.org/jira/browse/JBSEAM-2575 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170040#4170040 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170040 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: workaround for StackOverflow exception
anonymous wrote : You could try to use an in-memory configured version of HSQLDB. That does not realy persist to file, but it does doe db stuff. Good idea. But I'm not there yet, I still cannot make it going without exception. anonymous wrote : Regarding the issue, it manifests itself in Seam, but is jBPM related and fixed in the upcomming 3.2.4 afaik. You know, I nearly gave up using Seam because of this issue, trying to re-implement the process in pure jBPM. But if it is a jBPM's issue, are you saying that Timers cannot be used with States? Sounds like an ultra-critical issue to me. anonymous wrote : btw, you could configure jBPM to *not* use transactions or use it's own transactions instead of using the seam provided one. I would do anything, but I'm lost at what are the alternatives. I need to persist a state into DB. The only proper way to do that (is it so?) is to use State + Timer like I did. But you're saying it's not available till 3.2.4. If you could suggest how to persist the state in a decision loop (with or without States) in order to get rid of StackOverflow I would be grateful. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170104#4170104 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170104 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - workaround for StackOverflow exception
Hi, Can anyone suggest if there is a workaround for StackOverflow exception that happens in case of long decision loops without persisting process state into DB? https://jira.jboss.org/jira/browse/JBSEAM-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169858#4169858 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169858 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Can EJB3 Transaction span several jBPM Nodes?
Hi, I'm using jBPM process definition with Seam backed by EJB3 SLSBs as Action Handlers. Each node in my process calls a method in SLSB. How can I make transaction demarcation so that EJB3 Transaction span several Nodes, i.e. last more than one EJB3 method? Currently, the transaction finishes as soon as SLSB finishes which is a typical facade behavior. Can use BMT somehow here? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169862#4169862 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169862 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: workaround for StackOverflow exception
Thanks, Ronald I'm trying to implement an algorithm for building a chain of objects. I pick a position in the chain, select the most suitable object, insert that object and move on to next iteration. The whole process is a matter of several minutes, and I'm interested in its fastest completion. That's why I don't like the idea of syncing with the DB on each iteration, it is needless and slow in my scenario. Obviously I couldn't imagine to run against this sort of limitation while choosing jBPM for this. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169922#4169922 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169922 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: workaround for StackOverflow exception
And one more thing. I've introduced a State node to the process so that business process is persisted. But how can I move past it, cause if I signal current node I get a fair error this token is locked by token Will it help if I try to save the process into DB manually from one of my Node's action handlers? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169936#4169936 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169936 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: Using variables in Expressions
BTW, it turns out that in case Seam is used with jBPM it is Seam (not jBPM) who deals with EL resolution. http://seamframework.org/Community/UsingJBPMELInSeam View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169759#4169759 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169759 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: Using EJB3 transactions with jBPM
Thanks for you advice. All my nodes in the process definitions are plain Nodes and Decisions. It is still unclear, though, if one EJB3 transaction can span more than 1 node. All my changes are made persistent as soon as jBPM node finishes, while the next node starts another transaction. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169762#4169762 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169762 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Using EJB3 transactions with jBPM
Hi, I've we got the situation where the first node of my business process starts EJB3 transaction and the last node either commits it or rolls back. The problem I have now is that each action seems to be transactional, in other words all JPA operations that reside in the SLSB actions turn out to be persistent after the action method ends. Can anyone suggest how to organize proper transaction demarcation with jBPM, or is it purely EJB3 Seam issue? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169736#4169736 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169736 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: Using variables in Expressions
Thanks, Ronald. I'll try ask the same question on Seam forum. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169462#4169462 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169462 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: Using variables in Expressions
I'm a bit put down seeing lack of information on using EL in jBPM. The maximum I could find is a chapter Expressions http://docs.jboss.org/jbpm/v3/userguide/jpdl.html#expressions in the jbpm reference guide. There is not a single mentioning of how to use them among jBPM examples. Sure, there are pieces of code scattered through Internet and searchable by Google, but it feels sorta wrong learning stuff that way, it is inconsistent. It would be nice to see more EL examples in the manual, I guess I might raise a feature request if I'm not alone on this. Especially this applies to using jBPM with Seam (as stated towards the end of the above mentioned chapter). View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169640#4169640 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169640 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Using variables in Expressions
Hi, I'd like to use a business context variable in the EL block, like this: | decision name=my node expression=#{filteredBannersCount}... | This variable is declared in SLSB (via Seam) like this: @Out(scope = ScopeType.BUSINESS_PROCESS, required = false) | private String filteredBannersCount; However, it seems EL should point to methods only and not variables. I get the following error trying to use it: | 13:28:46,887 FATAL [application] javax.ejb.EJBTransactionRolledbackException: Identity 'filteredBannersCount' does not reference a MethodExpression instance, returned type: java.lang.String | javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: Identity 'filteredBannersCount' does not reference a MethodExpression instance, returned type: java.lang.String | Can we use business context vars in expressions? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169275#4169275 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169275 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Running jBPM process on schedule (using Seam)
Hi, My business process is currently bound to one of Seam actions with @CreateProcess (definition = MyBusinessProcess). Instead, I'd like to run it the on schedule, say once in a hour. How can do that? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169310#4169310 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169310 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: Running jBPM process on schedule (using Seam)
Well, doesn't jBPM have its own scheduler? Although, AFAIK it can't be used for scheduling processes, signals only. I'll have a look at Quartz tho, thanks for your suggestion. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169340#4169340 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169340 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: Using variables in Expressions
For the example's sake let's take this jPDL snippet from Seam dvd example | decision name=decide expression=#{orderApproval.howLargeIsOrder} | transition name=large order to=approval/ | transition name=small order to=process/ | /decision | Don't be confused, expression here is jBPM Expression Language, nothing to do with Seam EL (Or am I wrong?). My question is, can I put a variable from business context in the expression? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169344#4169344 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169344 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [J2EE Design Patterns] - Spawning new treads from MDB
Hi, I know, I know, the spec says I shouldn't do that. But, honestly, in practice, there are situations where spawning new threads from MDB (or SB for that matter) might be acceptable, aren't there? For example, I need to fetch some data from a number of DB servers and put that data onto some another DB servers, while the whole process must be triggered from MDB. The task begs to be threaded, but do you think I should follow the EJB recommendation and do it all sequentially or I'd be better off taking the multi-threading path regardless the cautions? My only AS is JBossAS, I'm not particularly concerned about porting the code on any other AS. Any advice is highly appreciated, vanyatka View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4138192#4138192 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4138192 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Clone Seam application for Virtual Domains
Hi, I have to admit I'm in a bit of a quandary. I need to clone a seam application and place it under new virtual domain name. The business logic should remain the same, while the presentation layer and the DB will change. The easiest option would be to build an EAR for each of the hosts, where only WAR and persistence.xml would be different. One of the drawbacks of this solution is that there is a copy of the JAR in all EARs, and if I need to make a change in actions, I would have to rebuild all EARs. Before writing this message I thought I'd much like to see a single instance of JAR, but that would require a single of EAR as well, and that in turn would require reloading the whole set of webapps to make a single change in any of the webapps. Please, correct me if I'm wrong here. Right now I'm thinking that creating multiple EARs for each of the virtual hosts isn't a bad solution, given that the process bulding those EARs is automated with ant. Has anyone had to solve this kind of task of cloning and putting clones under the different domain names? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4125194#4125194 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4125194 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Same element ID in many forms on the page
Shouldn't the used one belong to the form I'm sending? There are more than one form on the page, you don't mean each form should have own set of objects for binding its data, do you? =) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4114706#4114706 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4114706 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Same element ID in many forms on the page
Here it is. Also, when more then one element in the list the suggestionBox stops working. rich:dataTable id=cardList var=card value=#{cardList.resultList} | rendered=#{not empty cardList.resultList} | width=300px | | h:column | f:facet name=headerId/f:facet | h:outputText#{card.id}/h:outputText | /h:column | h:column | f:facet name=headerName/f:facet | s:link id=card value=#{card.name} view=/card.xhtml | propagation= | f:param name=cardId value=#{card.id} / | /s:link | rich:panel rendered=#{not empty card.tagLinks} id=tagsPanel | h:outputTextTags:/h:outputText | a4j:repeat id=detail value=#{card.tagLinksAsList} var=detail | h:outputText value=#{detail.tag.name} / | /a4j:repeat | h:messages / | /rich:panel | | h:form | rich:panel | h:panelGrid columns=2 | h:panelGroup | h:inputText value=#{tagHome.instance.name} id=suggestion / | rich:suggestionbox for=suggestion | suggestionAction=#{tagHome.autocomplete} var=tag | tokens=, width=200 height=100 | frequency=1000 | | h:column | h:outputText value=#{tag.name} / | /h:column | h:column | h:outputText value=#{tag.id} / | /h:column | /rich:suggestionbox | | /h:panelGroup | a4j:commandButton value=Add Tag reRender=tagsPanel action=#{tagHome.persist} | a4j:actionparam name=cardID value=#{card.id} | assignTo=#{tagHome.cardID} / | /a4j:commandButton | /h:panelGrid | /rich:panel | /h:form | | /h:column | /rich:dataTable View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4114487#4114487 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4114487 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Same element ID in many forms on the page
That in the action method it's value is null. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4114045#4114045 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4114045 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Fundamental question about em.persist
[EMAIL PROTECTED] wrote : What sort of persistence context are you using? Standard out-of-the-box conversation-scoped SMPC injected with @In. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4113037#4113037 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4113037 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Same element ID in many forms on the page
Hi, When I use the following form alone on the page everything is fine, but if put it into some iteration element, like rich:dataTable then #{tagHome.instance.name} varibale isn't initialised. Can anyone suggest what could be the matter? Any help is much appreciated, a4j:form ajaxSubmit=true | rich:panel | h:panelGrid columns=2 | h:panelGroup | h:inputText value=#{tagHome.instance.name} id=suggestion / | rich:suggestionbox for=suggestion | suggestionAction=#{tagHome.autocomplete} var=tag | tokens=, width=200 height=100 | frequency=1000 | | h:column | h:outputText value=#{tag.name} / | /h:column | h:column | h:outputText value=#{tag.id} / | /h:column | /rich:suggestionbox | | /h:panelGroup | a4j:commandLink value=Add Tag reRender=tagsPanel action=#{tagHome.persist} | a4j:actionparam name=cardID value=#{card.id} | assignTo=#{tagHome.cardID} / | /a4j:commandLink | /h:panelGrid | /rich:panel | /a4j:form | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112580#4112580 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112580 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Startup and hbm2ddl
Can anyone confirm/deny that entityManager cannot be used in @Startup components while hbm2ddl is being used? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112584#4112584 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112584 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Fundamental question about em.persist
I have to come back to this issue once again. There must be some easy explanation. The following code produces Test Card in the DB. Why the last change doesn't get persisted? It is a part of the transaction, after all. @Create | @Transactional | public void init() { | Card card = new Card(); | card.setName(Test Card); | entityManager.persist(card); | card.setName(The final name); | } | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112593#4112593 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112593 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Fundamental question about em.persist
JUnkie wrote : I always managed to avoid entity updates after a persist in the same method call... May I ask why? By itself persist() doesn't necessarily triggers DB call, just introduces the object to the persistence context. If I make an update later, should be fine, the important thing is that all changes are flushed before the transaction commits. anonymous wrote : | however what happens if you add | card = entityManager.merge(card); | directly after the persist call? Nothing changes. The same old record in the DB. Now again, after persist() finishes the object is already in the persistent context, unless it is wrapped in some sort of dynamic proxy object which is later saved into the DB instead of the original object. However I don't recall anything anywhere that would mention calling persist() the last method in your transaction, so to avoid changes between persist() and transaction commit. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112681#4112681 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112681 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Fundamental question about em.persist
Black magic, it works now, even without merge :) matt.drees gave me a hint how to @Startup application scoped components properly and it works now http://www.jboss.com/index.html?module=bbop=viewtopicp=4112676#4112676 The only change I made is that now the component starts up with @Startup, and when I reported I referenced it from some page so it would start up. So far I don't get what happened. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112686#4112686 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112686 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Startup and hbm2ddl
Thanks, matt! Your suggestion with depend annotation totally worked. And, also, it helped me with another issue I was having: http://www.jboss.com/index.html?module=bbop=viewtopicp=4112686#4112686 I'll definitely give the observer a try, never used any observers before. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112687#4112687 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112687 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Fundamental question about em.persist
Hi, Is there any functional difference between these two snippets (note the order of the last two statements)? When I look at the DB tables in the first case the name of the Card is null. Why so? I was dead sure any changes made to persistent object are flushed at the end of the transaction, so those two examples should give the same result. Everything is as expected in the second, the name of the Card is set properly. Can anyone comment on this? Thanks, | @Name(initDBBean) | @Scope(ScopeType.APPLICATION) | public class InitDBBean { | @Create | @Transactional | public void init() { | Card card = new Card(); | entityManager.persist(card); | card.setName(cardname); | } | } | } | | @Name(initDBBean) | @Scope(ScopeType.APPLICATION) | public class InitDBBean { | @Create | @Transactional | public void init() { | Card card = new Card(); | card.setName(cardname); | entityManager.persist(card); | } | } | } | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4111395#4111395 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111395 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - @Startup and hbm2ddl
Hi, I've run into the following problem. I need to progammatically populate entity tables whenever upon the startup of the application. I thought that an application-scoped component, annotated with the @Startup would be the ideal place for placing those em-related statements. However, apparently there is a conflict with the hbm2ddl, that is still running (or not yet finished exporting DB schema) by the time the application-scoped component is created and initialised. The log shows that Seam context is initialised even before the hbm2ddl is run, i.e. before the tables are created in my case, which makes my initial assumption incorrect. Where can I put my custom DB init statements so that they run after hbm2ddl has done its job? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4111397#4111397 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111397 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: how to attach Javadocs to JBoss Runtime
amitev wrote : I don't think this is possible through eclipse. Possible solution - download hibernate and in the zip file there is also the source code and a build script. You could modify the build script to pack the .java files besides the .class files. | Thanks for your reply, amitev, however I can hardly think your suggestion is the way to go. What peeves me is that this is an artificial restriction, someone needed for some reason to disable adding javadocs to runtime libraries, probably to keep it safe, or otherwise I'm lost about the reason. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109534#4109534 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109534 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - how to attach Javadocs to JBoss Runtime
Hi, I need to attach javadoc urls to the jar in the JBoss Runtime, however when I click on a jar (inside Package Explorer tab) in the Javadoc section I see this message anonymous wrote : The current class path entry belongs to container 'All JBoss Libraries [JBoss 4.2 Runtime]' which does not allow user modifications to Javadoc locations on its entries. How do you guys look up javadoc API in Eclipse, say persistence API docs for entitymanager? Sorry for yet another eclipse question, please let me know if I should post it on the eclipse forum (funny though, it seems there is no such thing as official eclipse forum) Thanks for your advice, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109506#4109506 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109506 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - comment/uncomment in .xhtml
I'm ashamed to ask this, but can anyone suggest how to comment/uncomment pieces of .xhtml files in eclipse with JBossTools installed? I'm new to Eclipse (switching from IDEA), there must be some plugin for this, probably. I tried to use xmlbuddy in hope for finding this silly bit of functionality, but the plugin has it's own syntax highlighting, so dumped it. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4108809#4108809 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108809 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: comment/uncomment in .xhtml
amitev wrote : xhtml is html with strict xml syntax. Use the standard !-- -- xml comment Thanks, that's useful. Manuall adding comments while automatically handling transactions and ORM and all the rest of hi-tech, sounds brilliant. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4108882#4108882 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108882 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: comment/uncomment in .xhtml
Just found out that !-- #{Seam EL} -- is actually run within the comments. IMHO it shouldn't be so, at least we need another pair of comment tags, cause if I need to e.g. temporarily switch off the creation of some component referenced in the page, simple commenting isn't enough, I need to remove that piece of code altogether from the page. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4108898#4108898 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108898 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
Hi, Max Good it's been taken care of to avoid confusion in the future, for now using only resources/ds.xml is fine. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107579#4107579 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107579 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Curious about existing successful projects developed wit
Thanks, Danno I look forward to having a look at it whenever you complete the job. I bet JBoss Seam team has a bunch of successful stories to present in conferences. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107581#4107581 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107581 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Curious about existing successful projects developed wit
Thanks, Pete, I will. I would put it proudly along with the top 10 reasons of using Seam :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107584#4107584 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107584 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Setting default JPA implementation in Eclipse
Hi, Is it necessary to set default JPA implementation setting in Eclipse preferences when working on a Seam web project? Or safe to ignore? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107452#4107452 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107452 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
Here is what I installed (Eclipse classic + WTP + JBossTools) eclipse-SDK-3.3.1.1-win32.zip dtp-sdk_1.5.1.zip emf-sdo-xsd-SDK-2.3.1.zip GEF-SDK-3.3.1.zip wtp-R-2.0.1-20070926042742.zip BossTools-2.0.0.CR1-ALL-win32.zip Here is what it shows there is: http://ibalashov.googlepages.com/eclipse_version.PNG View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107465#4107465 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107465 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
http://ibalashov.googlepages.com/multiple_persistence.PNG View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107467#4107467 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107467 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
[EMAIL PROTECTED] wrote : what version of Seam ? I'm not seeing these at all in CR1. | jboss-seam-2.0.0.GA anonymous wrote : Could you try with the latest nightly build please ? Nightly build of Seam? Are you saying the project layout is generated by seam and not by JBossTools? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107469#4107469 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107469 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
[EMAIL PROTECTED] wrote : yes - the double persistence.xml is because of you choosing to enable the Dali facet which randomly chooses a META-INF directory to put its orm.xml and persistence.xml | | ...another reason why don't enable that by defaut ;) I see now. If I don't enable JPA facet during project setup I don't have this trouble. Good, good :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107471#4107471 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107471 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
What about a second datasource file? It is still present even without ticking JPA facet. By the way, I noticed that the project structure generated in Eclipse is slightly different from that generated by seam-gen, particularly what concerns production/development/testing configurations. I assume that test configuration is now separated into another project, but how to run development/production configuration in Eclipse, without using ANT? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107473#4107473 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107473 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Setting default JPA implementation in Eclipse
Ok, thanks. Cost me a bit of time to figure why my username became the default schema name. At first I thought I just mixed them up by mistake. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107474#4107474 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107474 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
double ds.xml issue didn't go away after I deleted and recreated the project. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107477#4107477 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107477 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
Will take me a bit of time to download, I'll post back tomorrow how goes. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107487#4107487 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107487 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: Double datasource files and persistence.xml in default S
Hi, The same thing with JBossTools-200711231607. There are two ds.xml files in resources/ and src/model/META-INF/ folders. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107552#4107552 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107552 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Curious about existing successful projects developed with Se
Hi, It would be very interesting to hear about existing projects developed with Seam, particularly how long have they been developed for, what tools have been used (Eclipse or IDEA, or whatever), what were major difficulties, how painful is maintenance, etc. Is such info available? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107424#4107424 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107424 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Double datasource files and persistence.xml in default Seam
Hi, I've just generated a new Seam web project in Eclipse with the latest JBoss Tools installed. In the layout of the project folders there are two versions of perisistence.xml as well as datasource (MyProject-ds.xml) files. 1. persistence.xmllocated in src/model/META-INF and src/META-INF When the application is deployed only the first one is put into the war, specifically into /WEB-INF/classes/META-INF folder. What is the point in second src/META-INF/persistence.xml? 2. MyProject-ds.xml located in resources/ and src/model/META-INF The first one goes sibling with .war file (or directory) to the root dir of the deploy dir, the second goes into /WEB-INF/classes/META-INF, and apparently is ignored by JBossAS. What is the point of src/model/META-INF/MyProject-ds.xml? Is it somehow related to the differences between development/production/testing versions? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107450#4107450 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107450 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: unexplode problems
WinXP, JBoss-4.2.2, Seam-2.0.0 Let me acknowledge the same problem. After the app has been once exploded into JBoss deploy dir it cannot be removed apparently because some jars are locked up. This is especially annoying when the app hasn't deployed properly, and needs re-deplyment, which in turn cannot be done due to the above problem. So far have to resort to normal .war deployment, however once in several times run into PermGenSpace out of memory exception, which is well discussed on forums. Out of curiosity, does the majority of public here run AS on Linux even during development? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4104594#4104594 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4104594 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Log and EntityManager are not injected in integration test
Hi, I'm at the very beginning of adding integration testing to my Seam application, and I have the following problem. The EntityManager and Log objects used inside the action bean are nulls during invoking the tests, unless I set them manually (which AFAIK I should not). ( To clarify, the test just tries to access rootCategories context variable which is set in the SFSB, also shown below) anonymous wrote : @Test | public void test() throws Exception { | | String cid = new FacesRequest(/addCategory.seam) { | | @Override | protected void invokeApplication() throws Exception { | getValue(#{rootCategories}); | } | } | Here is the SFSB: anonymous wrote : @Local(CategoryManager.class) | @Stateful | @Name(categoryBean) | public class CategoryBean { | | @Logger | Log log; | | @In(create = true) | private EntityManager em; | | @Out(required = false) | private List rootCategories; | | public CategoryBean() { | } | | @Factory(rootCategories) | public List findRootCategories() { | log.info(Refreshing the list of root Categories); | Query query = em.createQuery(select c from Category c where c.parentCategory.id = 1 and c.id 1); | List list = query.getResultList(); | for (Object o : list) { | System.out.println(o = + o); | } | return list; | } | | @Remove | @Destroy | public void remove() { | } | | } Now I run into NullPointerException inside findRootCategories() method, because neither em no log objects are intialized. Unit testing works fine, btw, when I add the following lines to the test body: anonymous wrote : EntityManagerFactory emf = | Persistence.createEntityManagerFactory(MyCardsPersistenceUnit); | EntityManager em = emf.createEntityManager(); | setField(categoryBean, em, em); | setField(categoryBean, log, Logging.getLog(CategoryBean.class)); | Can anyone give a hint? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4094177#4094177 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4094177 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: slink join and conversationID
jacob.orshalick wrote : Also, have you checked the seam.debug page? Is conversation with id 1 sticking around in memory? Thanks for this tip, the debug page is vastly helpful! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4088408#4088408 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088408 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: slink join and conversationID
jacob.orshalick wrote : Ok, so did you begin a long-running conversation with cid 1? By default, Seam is always going to create a conversation for the processing of a request, but you must promote that conversation to long-running if you want it to continue. join=true will start a long-running conversation if there is no long-running conversation to join. The issue is that I'm not being able to promote a regular conversation to a long-running one while keeping the ID of the original conversation. When I link a page to itself with s:link propagation=begin, then a new long-running conversation is created, but it has the different conversationID to the original one, so I presume this means that it's become a different conversation, and what particularly worries me is that SMPC of the original conversation is lost. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4088425#4088425 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088425 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: slink join and conversationID
Thanks, Jacob. I got the idea! Now gonna try it out :) (I wish I could award you some duke dollars, or whatever is it called :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4088452#4088452 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088452 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - slink join and conversationID
Hi, Must be something rather obvious, yet I'm not aware of it. I have a page with a s:link element with propagation join and conversation.id output. When I first load the page I see conversation as 1 which is fine. But when I click the link the conversation ID increases to 2, regardless of the propagation join. In next clicks it stays the same on 2, which is as expected. Can anyone shed a light on why the first click is different from all the latter's? Is it a JSF feature I don't know about? ps. I never worked with JSF before, is it absolutely necessary to know all the intricacies of JSF in order to write Seam apps? Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4088233#4088233 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088233 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Booking Example - Do I miss the point about transactions
[EMAIL PROTECTED] wrote : Uncommitted changes will still be in the persistence context, right? Ah, that explains it! Knowing about ACID isn't enough to get the question clear, there is another figure here - Persistent Context :) Thanks, Norman View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4087342#4087342 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4087342 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: SessionBeans depend on JSF component libraries?
[EMAIL PROTECTED] wrote : No, SessionBeans don't depend on JSF libraries. Yes, you can bind to jsf components if you wish - but you probably shouldn't to avoid separation of concerns. You should follow seam-gen packaging. Are they not? I'm particularly interested in using the Tree component, and according to examples I've found this is how I handle OnSelect event: public void onSelect (NodeSelectedEvent event) { ... } Are you suggesting that I should put this method into Seam POJO handlers instead of SessionBeans? One way or the other, it doesn't change the fact that the ejb.jar inside the .ear depends on RichFaces libs. To overcome this I put all richfaces libs at the top of .ear file and referenced them in META-INF/application.xml View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4086552#4086552 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086552 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: SessionBeans depend on JSF component libraries?
[EMAIL PROTECTED] wrote : Well my definition of dependency is absolutely required by - here it isn't a requirement, just the way you choose to structure your app. Well, it is necessary as long as I want to use the component :) If you say don't use RichFaces (particularly trees, not sure about other UI components), then yes, it is not a requirement :) anonymous wrote : 1) In RichFaces 3.1 you have an api jar which contains stuff you may need to reference from your ejbs Aha, that's more like it :) anonymous wrote : 2) In RichFaces 3.1 you also have a xml bound tree which may not have this problem. Hm... I construct my tree from the data from DB, so I'm not quite sure this can really help me. But thanks for mentioning it anyway. RF also needs to provide an optional version of onSelect which doesn't take any parameters. (I'm not sure if does or not). | My understanding is that some UI components require their action beans link to RF libs while others don't. Is that so? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4086576#4086576 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086576 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: SessionBeans depend on JSF component libraries?
[EMAIL PROTECTED] wrote : Yes, as few as possible is our aim (we are working on reducing this e.g. the tree design mentioned above). Thanks for your help, Pete. It's all much clearer to me now. Is it too bad that I referenced RF libs in the application.xml? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4086593#4086593 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086593 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Booking Example - Do I miss the point about transactions?
Hi, If we have a look at the BookingListAction class (listed below), its transaction attribute suggests, that each method in that class will trigger a new transaction. My question is about the cancel() method, which as you can see removes the booking, and updates the list of bookings. What confuses me is that getBookings() is called from cancel(), before cancel() is finished, which means that cancel's transaction is not commited and no changes is made persistent. According to my understanding getBookings() should get the same unupdated list of objects, which makes no sense and in fact is not true. Can anyone kindly suggest what I miss here? Thanks @Stateful | @Scope(SESSION) | @Name(bookingList) | @Restrict(#{identity.loggedIn}) | @TransactionAttribute(REQUIRES_NEW) | public class BookingListAction implements BookingList, Serializable | { |private static final long serialVersionUID = 1L; |@PersistenceContext |private EntityManager em; | |@In |private User user; | |@DataModel |private ListBooking bookings; |@DataModelSelection |private Booking booking; | |@Logger |private Log log; | |@Factory |@Observer(bookingConfirmed) |public void getBookings() |{ | bookings = em.createQuery(select b from Booking b where b.user.username = :username order by b.checkinDate) | .setParameter(username, user.getUsername()) | .getResultList(); |} | |public void cancel() |{ | log.info(Cancel booking: #{bookingList.booking.id} for #{user.username}); | Booking cancelled = em.find(Booking.class, booking.getId()); | if (cancelled!=null) em.remove( cancelled ); | getBookings(); | FacesMessages.instance().add(Booking cancelled for confirmation number #{bookingList.booking.id}); |} | |public Booking getBooking() |{ | return booking; |} | |@Destroy @Remove |public void destroy() {} | } | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4086995#4086995 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086995 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Question about HTTP sessions and Seam Session Context
Hi, Reading a book about Seam Apress.Beginning.JBoss.Seam.Feb.2007 in the section about conversations I've come across the following paragraph: anonymous wrote : So what happens if you want to price out another flight? Well, you could create a | complex session management tool to keep a map of the session value tied to some ID for | each of the new sessions. However, most sites do not work that way, because, wow, that?s | complex. Instead, they usually rely on the user to open a new browser window (which in | turn triggers a new session to be created) and price out that flight. At that point, you can | price out your flights. However, it is impossible for those two session objects to know | anything about each other. Well, there are ways to be aware of the other sessions, but the | methods that allowed that have been deprecated for quite some time. There are | advanced tricks you could do, but nothing you want to try in reality. At any rate, what if | you wanted those two ?sessions? to be aware of each other? What if there was shared data | between them that you did not want to repeat? Well, you could not do it. However, this is | the problem that Conversation contexts attempt to overcome. As far as I can tell opening a new tab or window does not initiates a new HTTP session, simply because browser will send back all the cookies that was stored while working in the previous window/tab. Now the question is, can we or can we not have multiple HTTP sessions within one browser application? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4087016#4087016 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4087016 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - SessionBeans depend on JSF component libraries?
Hi, I've just started using RichFaces in my Seam applications and apparently SessionBeans cannot avoid referencing UI components. Is it supposed to be like this? I mean in Spring people are worried about propagating business logic into the presentation layer (Open Session in View), but here it is the other way around! From inside a SessionBean now I can manipulate UI components, collapse trees, change styles... And where to package those libraries? Should they go to the top level of the .ear file? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4086041#4086041 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086041 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Do WebApps need EJB?
Hi, I need to develop a web application which should be scalable. Is there any reasons in using EJB if I need only a web interface to business logic layer? What are the reasons motivating people choose to use EJB for developing web applications? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4076095#4076095 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4076095 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user