[JBoss jBPM] - Re: jpdl-3.2.Beta2: how to access variable from task form in
by cdart_rrr
Hi Arjan, having battled with Conditions recently I'd like to add my 2 cents' worth that the reason why your original transition/condition@expression wasn't evaluated looks to be a bug in org.jbpm.jpdl.xml.JpdlXmlReader in resolveTransitionDestination() (l 805 of my version of 3.2beta2). It tries to get the expression from the text of element - if null it then goes to try to get it from the expression attribute. Only trouble is the text is returned from getTextTrim() as "" rather than null so you never get to look at the attribute. This is of course what you found (by putting the expression as the text of rather than as an attribute). But changing l 805 to test for "" as well as null then allows either format...
| if ( null == condition || condition.length() == 0) {
| //....
|
It ought to be a bug but I can't currently get the src from cvs to see if it's been corrected. Is cvs still there? (I noted your comment above about wrong cvs details).
brgds
\rr
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020459#4020459
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020459
19Â years, 2Â months
[JBoss Seam] - injection into stateless bean (which is called from an MDB)
by codelion
Wrote a MDB months ago, used @PersistenceContext and @EJB to inject. Inside the MDB via one of those @EJB got a stateless bean and called a method in it (to do the actual task). That stateless bean also used @PersistenceContext, @Resource and @EJB.
Then I wanted to make better use of Seam, so I started using @In in the stateless bean instead of @EJB.
Now when executing I get NPE because these @In fields have nothing in them. The NPE occurs where the field is used because it is null, NOT earlier. I did NOT make required=false.
Is there an obvious problem?
Ref doc 3.2.5. Message-driven beans reads "Message-driven beans may not be bound to a Seam context. Nor do they have access to the session or conversation state of their caller. However, they do support bijection and some other Seam functionality."
So what can I inject then?
One of my null @In fields was supposed to get a proven stateless bean of mine which has a @Name, the other a ManagedQueueSender Seam component.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020453#4020453
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020453
19Â years, 2Â months
[EJB 3.0] - Re: SerializationException when attempting to activate a sta
by grdzeli_kaci
hi redyz,
i did it,
the problem is that in statefull session bean i had define Query class object and this class is not a serializable.
you must define this class as transient or use it only method scope.....
my programm example
| @Stateful
| @Remote(CountFasade.class)
| public class CountFasadeBean implements CountFasade {
|
| @PersistenceContext(unitName = "srvProvOracle")
| private EntityManager oracleManager;
|
| Query _query = null;
|
| public void addCount() throws Exception {
| try {
| _query = oracleManager.createNativeQuery("some query");
| } catch (Exception e) {
| e.printStackTrace();
| throw e;
| }
| }
| }
|
|
must be like this :
| @Stateful
| @Remote(CountFasade.class)
| public class CountFasadeBean implements CountFasade {
|
| @PersistenceContext(unitName = "srvProvOracle")
| private EntityManager oracleManager;
|
| @Transient
| Query _query = null;
|
| public void addCount() throws Exception {
| try {
| _query = oracleManager.createNativeQuery("some query");
| } catch (Exception e) {
| e.printStackTrace();
| throw e;
| }
| }
| }
|
or like this :
| @Stateful
| @Remote(CountFasade.class)
| public class CountFasadeBean implements CountFasade {
|
| @PersistenceContext(unitName = "srvProvOracle")
| private EntityManager oracleManager;
|
| public void addCount() throws Exception {
| try {
| Query _query = oracleManager.createNativeQuery("some query");
| } catch (Exception e) {
| e.printStackTrace();
| throw e;
| }
| }
| }
|
|
good luck
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020445#4020445
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020445
19Â years, 2Â months
[EJB 3.0] - eager vs. lazy fetching
by eiben
Hi,
in my entities I defined my joined tables as being lazy; however, if I want to display a lot of detailed information it might be a good idea to retrieve the data using eager fetching. Is there any way to set the fething mode programmatically for certain methods?
In this respect: I have a web-GUI, where the data is retrieved in a servlet and then the presentation is being rendered by a jsp-page using getServletContext().getRequestDispatcher(targetPage).forward(request, response);
Problem: I want to iterate over a list of items and I want to display sub-items as well, unfortunatly those items are not yet fetched (lazy), and since I "redirected" the processing to the jsp-page the entity-manager is no longer available.
Has anyone a solution for this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020442#4020442
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020442
19Â years, 2Â months