[EJB 3.0] New message: "How to initialize the State of an EJB3 Stateful Bean"
by Jerry Simone
User development,
A new message was posted in the thread "How to initialize the State of an EJB3 Stateful Bean":
http://community.jboss.org/message/522999#522999
Author : Jerry Simone
Profile : http://community.jboss.org/people/jlsimone
Message:
--------------------------------------------------------------
In EJB2, you can pass the state to a stateful EJB using the home interface and the arguments that are defined for the ejbCreate method of the bean. This seems like it should be a simple thing do to, and I feel a little dumb asking the question, but how do you pass the state into an EJB3 stateful bean? All of the documentation that I have read so far assumes that the EJB creates its own state when the (no-arg) constructor is called. But in my case, the business logic of the application has already created a state (in the form of an object tree) that it needs to pass into the stateful bean. I have created what I consider a hack, which is to expose an "initialize" method in the remote/local interface. The initialize method sends the state to the EJB in the arguments of the method arguments. What are the better options for doing this?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522999#522999
15 years
[JBoss Web Services] New message: "Slow performance with JBossWS 3.2.0_GA"
by Michael Eibeck
User development,
A new message was posted in the thread "Slow performance with JBossWS 3.2.0_GA":
http://community.jboss.org/message/522994#522994
Author : Michael Eibeck
Profile : http://community.jboss.org/people/skymic
Message:
--------------------------------------------------------------
Hi,
I use a JBoss AS V5.1.0_GA. I have downloaded JBossWS V3.2.0_GA separately and deployed it to JBossAS V5.1.0_GA.
I use JDK V1.6.0_17.
I generated a WS from a wsdl with wsconsume using the top down approach. I deployed the server part as a web application (war) on JBoss AS.
The client part is included in a java client.
During testing between client and server I noticed slow response time. I tracked down the problem and noticed, that the slow performance is due to slow response time of the WS stack.
The request time from client to server is OK. The response time of the server response from server to client is up to 21 sec. That's literally the elapsed time from WS server response to WS client reception of this response. I have observed this slow response on all my WS messages, simple ones and complicated ones.
To illustrate the problem I include one message here:
wsdl:
<message name="loginRequest">
<part name="loginRequestPart" element="sdo:login"/>
</message>
<message name="loginResponse">
<part name="loginResponsePart" element="sdo:loginResponse"/>
</message>
<operation name="login">
<input message="tns:loginRequest"/>
<output message="tns:loginResponse"/>
<fault name="LoginFault" message="tns:loginFault"/>
</operation>
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="login">
<soap:operation/>
<input>
<soap:body parts="loginRequestPart" use="literal"/>
</input>
<output>
<soap:body parts="loginResponsePart" use="literal"/>
</output>
<fault name="LoginFault">
<soap:fault name="LoginFault" use="literal"/>
</fault>
</operation>
the involved types of the imported schema file are:
<xs:complexType name="login">
<xs:sequence>
<xs:element name="username" type="xs:string"/>
<xs:element name="password" type="xs:string"/>
<xs:element ref="sdo:scopeIdentifier"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="loginResponse">
<xs:sequence>
<xs:element name="securityToken" type="xs:hexBinary"/>
<xs:element name="isSupervisor" type="xs:boolean"/>
<xs:element name="isEditor" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
Does anyone know what the reason for the slow response time of such a simple WS message could be?
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522994#522994
15 years
[jBPM] New message: "Re: Jbpm3.2 on Tomcat6-MySQL problem"
by federico farina
User development,
A new message was posted in the thread "Jbpm3.2 on Tomcat6-MySQL problem":
http://community.jboss.org/message/522987#522987
Author : federico farina
Profile : http://community.jboss.org/people/federico.farina
Message:
--------------------------------------------------------------
javax.el.ELException: /search/tasks.xhtml @14,81 session="#{jbpmBean.jbpmContext.session}": Error reading 'session' on type org.jbpm.JbpmContext
Caused by: org.hibernate.HibernateException: Could not locate TransactionManager
at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:26)
Caused by: javax.naming.NameNotFoundException: Name TransactionManager is not bound in this Context
This is the exception stack trace.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522987#522987
15 years
[JBoss Portal] New message: "User not found with UserModule"
by Holger Breuer
User development,
A new message was posted in the thread "User not found with UserModule":
http://community.jboss.org/message/522985#522985
Author : Holger Breuer
Profile : http://community.jboss.org/people/Gamba
Message:
--------------------------------------------------------------
Hi,
I want to read the current users email adress out of the UserProfileModule.
I placed the following code in a portlet, o jsf-managed-bean and an ejb with transaction-attribute required:
try {
UserModule userModule = (UserModule) new InitialContext().lookup("java:portal/UserModule");
User user = userModule.findUserByUserName(this.getCurrentUser());
System.out.println("USER = " +user.getUserName());
System.out.println("USER = " +user.toString());
UserProfileModule userProfile = (UserProfileModule) new InitialContext().lookup("java:portal/UserProfileModule");
String email = (String) userProfile.getProperty(user, User.INFO_USER_EMAIL_REAL);
System.out.println("EMAIL = " +email);
}
catch (NamingException ne) {
ne.printStackTrace();
}
catch (IdentityException ie) {
ie.printStackTrace();
}
In everey situation I get the following error:
14:34:20,468 ERROR [JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:6b7:4b62e241:905 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:6b7:4b62e241:905 status: ActionStatus.ABORT_ONLY >))
14:34:20,468 ERROR [HibernateUserModuleImpl] Cannot find user by name admin
org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
It seems that something with the transaction is not ok .....
Thx,
Holger
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522985#522985
15 years
[jBPM] New message: "Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry."
by Martin Porter
User development,
A new message was posted in the thread "jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.":
http://community.jboss.org/message/522977#522977
Author : Martin Porter
Profile : http://community.jboss.org/people/jedizippy
Message:
--------------------------------------------------------------
Hi,
Unfortunately its not that easy to reproduce. It seems to occur randomly and we have so far not been able to identify the cause. We send in 5 parameters into each subprocess and it seems that one of these parameters (String) ends up in the same row as a value that is created inside a DecisionHandler java class. I will try and see if we can figure out what might be causing it.
We are having major issues with ID generation at the moment and have implemented our own ID Generator to see if we can cure the problem. Maybe that will also solve this issue.I will update this thread if I find anything out.
Regards
Martin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522977#522977
15 years