[JBoss AOP] - Re: intercept TransactionManager->commit()
by gnulp
tried everything, but it seems not to be possible in ejb3 ...
unfortunatelly javax.ejb.SessionSynchronization is just useable in statefull session-beans, but I have stateless session-beans ...
The problem arises in combination with cascading storing of entities that is supported in ejb3 ==> when a statless session-bean updates an entity with relations you have no chance to get a clue which objects have been modified!
You might use ejbs PreUpdate to get an idea which object has been updated, but that is not called synchronously ==> in other words the callback happens after you left the stateless function call (so no way to be manipulated within an interceptor !). You can also not implement some fiunctionality in the PreUpdate-Call itself because you are not allowed to use entityManagers there --> so I hoped to solve it with AOP - but NOPE ;-)
Anyhow - thx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992739#3992739
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992739
19 years, 4 months
[JBossWS] - Document/Literal and multiple inputs
by tobake
Hi!
I trying to get this dummyMethod to work with document/literal
public class Test {
|
| @WebService(name="testWS", serviceName="TestService")
| @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
| use=SOAPBinding.Use.LITERAL,
| parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
| @WebMethod
| public String dummyService(String input, String input2) {
| log.debug("dummyService was called");
| return "Okey I am here";
| }
| }
|
|
This did work when I only had one input parameter. But when testing with multiple inputs I get the following error when trying to deploy to jboss.
12:17:44,644 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.5.GA/server/default/tmp/deploy/tmp14496icr3.ear-contents/icr3.war
| org.jboss.ws.WSException: Attempt to map multiple operation inputs to: {http://webservice.icr3.com/jaws}dummyService
I have tried parameterStyle.WRAPPED and then it deploys but in that case it is giving me strange result when I try to consume the service with my .NET consumer application. I simply dont get the right input parameters in my proxy.
instead of looking like this :
proxy.dummyService(String input1, String input2)
it shows this :
proxy.dummyService(tester.jbossws.dummyService dummyService1)
Help is appriciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992733#3992733
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992733
19 years, 4 months
[JBoss Seam] - How to send a parameter with checkbox in JSF in order to get
by lara
I have an object of type Group. Each group has an ID, name & description. I want to list the groups and add a checkbox next to each one. In the form, I have a button Add, when it is clicked, I should be able to get first all the groups selected. I want to know how can I send the ID of the checked group with the <h:selectBooleanCheckbox> because I need to have the ID in the bean in order to perform some actions. Is that possinle?
The code in the JSF looks as follow:
| <h:dataTable var="group" value="#{groupList}" rendered="#{groupList.rowCount>0}">
|
| <h:column>
| <f:facet name="header">
| <h:outputText/>
| </f:facet>
| <h:selectBooleanCheckbox
| value="#{addExecutorToGroup.groupsSelected}">
| </h:selectBooleanCheckbox>
| </h:column>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="#{msg.name}"/>
| </f:facet>
| <h:outputText value="#{group.name}" />
| </h:column>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="#{msg.description}" />
| </f:facet>
| <h:outputText value="#{group.description}" />
| </h:column>
|
| </h:dataTable>
|
Note that value="#{groupList}" is the List of groups and groupsSelected is a boolean variable which has it setter and getter defined in the bean.
What I did for now is to save the list of boolean variable into an array and for example, if the second index contains a value true, I check the second element in the groupList and gets its ID from the bean. This doesn't work when I add sorting and things will be confused that is why I want to send the ID from the JSF page. Can anyone propose any solution?
Any help is appreciated!
Thanks in advance.
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992731#3992731
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992731
19 years, 4 months
[JBoss jBPM] - Problem using command executor (batch update error)
by Fleury
Hey,
I'm trying to use the command executor for asynchronous continuation. I get the following error :
[java] 50034 [JbpmCommandExecutor] DEBUG org.jbpm.persistence.db.DbPersistenceService - committing hibernate transaction
[java] 11:12:19,941 ERROR AbstractFlushingEventListener:301 - Could not synchronize database state with session
[java] org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
[java] at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
[java] at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
[java] at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:24)
[java] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2338)
[java] at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2242)
[java] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2542)
[java] at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
[java] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
[java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
[java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
[java] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
[java] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
[java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
[java] at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
[java] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
[java] at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:162)
[java] at org.jbpm.svc.Services.close(Services.java:211)
[java] at org.jbpm.JbpmContext.close(JbpmContext.java:141)
[java] at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:144)
[java] at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
I cannot find the problem.
Thanks for your advices.
LF
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992727#3992727
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992727
19 years, 4 months