[JBoss JIRA] Created: (JGRP-822) NAKACK: concurrent delivery of messages from the same sender
by Bela Ban (JIRA)
NAKACK: concurrent delivery of messages from the same sender
------------------------------------------------------------
Key: JGRP-822
URL: https://jira.jboss.org/jira/browse/JGRP-822
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 2.x
JGroups delivers messages from different senders concurrently. However, it delivers messages from the same sender sequentially. Sometimes, we can deliver messages from the same sender concurrently too, if the app tells us it is okay. For example:
- Node N was 3 HTTP sessions: A, B and C
- Clients update those sessions concurrently
- As a result, N sends the following messages: A1, B1, A2, C1, C2, C3, B2, A3
- As NAKACK assigns sequence numbers (seqnos) based on JGroups instances, all messages from N will have to be
delivered in the same order in which they were sent, e.g. (-> means followed by):
A1 -> B1 -> A2 -> C1 -> C2 -> C3 -> B2 -> A3
- This means that, for example, the first update to C (C1) has to wait until A1, B1 and A2 have been delivered
- This is not optimal, as updates for A, B and C are completely independent, and can be delivered in parallel
- So a better delivery would be ('||' means concurrent delivery):
A1 -> A2 -> A3 || B1 -> B2 || C1 -> C2 -> C3
- A3 needs to be delivered after A2 which needs to be delivered after A1. However, all updates for A can be delivered
concurrently with messages for B or C.
- OOB doesn't help: here all messages are delivered concurrently, but there is also no ordering within A, B or C !
SOLUTION: the sender adds a 'scope' token to a Message, e.g. the jsessionid (A, B or C). JGroups maintains NakReceiverWindows per *scope*, not per sender. The sender's address is the default token, so in the absence of a scope token, JGroups of course maintains NakReceiverWindows per sender. (NakReceiverWindows are used to keep track of seqnos).
In the above example, if the scopes sent with *each message* are A, B and C, then we'd have 3 NakReceiverWindows:
N::A, N::B, N::C.
Each window would start with seqno 1, so updates for A, B and C are delivered concurrently with respect to each other, but sequentially within the scope.
Issues:
- This is an API change, and should probably be propagated up to the building blocks, such as RpcDispatcher.
- A scope needs to be associated with an address A (of a JGroups instance): when A leaves or crashes, all associated scopes and their NakReceiverWindows needs to be released, too
- Should this be done for UNICAST too ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (EJBTHREE-724) persistence.xml jar-file processing
by Heiko W. Rupp (JIRA)
persistence.xml jar-file processing
-----------------------------------
Key: EJBTHREE-724
URL: http://jira.jboss.com/jira/browse/EJBTHREE-724
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - FD
Reporter: Heiko W. Rupp
EJB 3 persistence spec says in 6.2.1.6, 2nd paragraph about <jar-file>
"Such JAR files are specified relative to the root of the persistence unit (e.g.,utils/myUtils.jar)"
When I have a persistence.xml like this:
<persistence>
<persistence-unit name="jon">
<jta-data-source>java:/JONDS</jta-data-source>
<jar-file>lib/on-enterprise-server-2.0-SNAPSHOT.jar</jar-file>
</persistence-unit>
</persistence>
The PersistenceUnitDeployment gives
file:/jboss-4.0.5.CR1/bin/lib/on-enterprise-server-2.0-SNAPSHOT.jar]
but the root of the PersistenceUnit is
file:/jboss-4.0.5.CR1/server/jon/deploy/on.ear/on-enterprise-server-entity-ejb-2.0-SNAPSHOT.jar/
2006-10-04 18:00:43,537 DEBUG [org.jboss.ejb3.entity.PersistenceUnitDeployment] Found persistence.xml file in EJB3 jar
2006-10-04 18:00:43,538 DEBUG [org.jboss.ejb3.entity.PersistenceUnitDeployment] adding JarFile URL: file:/jboss-4.0.5.CR1/bin/lib/on-enterprise-server-2.0-SNAPSHOT.jar
2006-10-04 18:00:43,586 INFO [org.hibernate.ejb.Version] Hibernate EntityManager 3.2.0.CR2
2006-10-04 18:00:43,625 INFO [org.hibernate.cfg.annotations.Version] Hibernate Annotations 3.2.0.CR2
2006-10-04 18:00:43,638 INFO [org.hibernate.cfg.Environment] Hibernate 3.2 cr4
2006-10-04 18:00:43,649 INFO [org.hibernate.cfg.Environment] hibernate.properties not found
2006-10-04 18:00:43,654 INFO [org.hibernate.cfg.Environment] Bytecode provider name : javassist
2006-10-04 18:00:43,666 INFO [org.hibernate.cfg.Environment] using JDK 1.4 java.sql.Timestamp handling
2006-10-04 18:00:43,906 DEBUG [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
name: jon
persistence provider classname: org.hibernate.ejb.HibernatePersistence
classloader: org.jboss.mx.loading.UnifiedClassLoader3@3b31a6{ url=file:/jboss-4.0.5.CR1/server/jon/deploy/on.ear/ ,addedOrder=43}
Temporary classloader: null
excludeUnlistedClasses: false
JTA datasource: org.jboss.resource.adapter.jdbc.WrapperDataSource@c90acb
Non JTA datasource: null
Transaction type: JTA
PU root URL: file:/jboss-4.0.5.CR1/server/jon/deploy/on.ear/on-enterprise-server-entity-ejb-2.0-SNAPSHOT.jar/
Jar files URLs [
file:/jboss-4.0.5.CR1/bin/lib/on-enterprise-server-2.0-SNAPSHOT.jar]
Managed classes names []
Mapping files names []
Properties [
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Created: (EJBTHREE-1252) @PersistenceContext injection from a different jar fails
by jaikiran pai (JIRA)
@PersistenceContext injection from a different jar fails
--------------------------------------------------------
Key: EJBTHREE-1252
URL: http://jira.jboss.com/jira/browse/EJBTHREE-1252
Project: EJB 3.0
Issue Type: Bug
Components: injection
Affects Versions: AS 4.2.2.GA
Environment: JBoss-4.2.2GA, Windows 2003 Server, Sun Java 1.5
Reporter: jaikiran pai
I have a sample application with an EJB3 SLSB which is being injected with a PersistenceContext which is configured in a different jar file as follows
package org.myapp.ejb.impl;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.jboss.annotation.ejb.RemoteBinding;
import org.myapp.ejb.AppManager;
@Stateless
@Remote ({AppManager.class})
@RemoteBinding (jndiBinding = "AppManagerBean")
public class AppManagerBean implements AppManager {
@PersistenceContext (unitName="myapp_ejb3.jar#EJB3Persistence")
private EntityManager em;
public String getVersion() {
System.out.println("EM is " + em);
return "1.0";
}
}
The application is deployed as an EAR file in the following structure:
EJB3Persistence.ear
|
|--- META-INF
| |
| |--- META-INF
| | |
| | |--- application.xml
| | |
| | |--- jboss-app.xml
|
|
|--- myapp_ejb3.jar (contains the persistence.xml)
| |
| |--- META-INF
| | |
| | |--- persistence.xml
|
|
|
|--- another_ejb3.jar (contains the SLSB)
| |
| |
| |--- META-INF
| |
| |--- org.myapp.ejb.impl.AppManagerBean
When this application is deployed in 4.2.2 the deployment fails with an exception. Part of the exception is pasted below. The relevant log files (ConsoleLog_Fail.txt and serverLog_fail.txt in the logs.zip file) are attached.
22:45:41,137 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
22:45:41,152 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=EJB3Persistence.ear,jar=another_ejb3.jar,name=AppManagerBean,service=EJB3 with dependencies:
22:45:41,152 INFO [JmxKernelAbstraction] persistence.units:jar=pp_ejb3.jar,unitName=EJB3Persistence
22:45:41,152 INFO [EJB3Deployer] Deployed: file:/D:/JBoss-4.2.2/jboss-4.2.2.GA/server/default/tmp/deploy/tmp53619EJB3Persistence.ear-contents/another_ejb3.jar
22:45:41,168 INFO [EARDeployer] Started J2EE application: file:/D:/JBoss-4.2.2/jboss-4.2.2.GA/server/default/deploy/EJB3Persistence.ear
22:45:41,184 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:ear=EJB3Persistence.ear,jar=another_ejb3.jar,name=AppManagerBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=pp_ejb3.jar,unitName=EJB3Persistence
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:jar=pp_ejb3.jar,unitName=EJB3Persistence
State: NOTYETINSTALLED
Depends On Me:
jboss.j2ee:ear=EJB3Persistence.ear,jar=another_ejb3.jar,name=AppManagerBean,service=EJB3
If i change the PersistenceContext injection, in the bean, to prefix 3 random letters to the unitName as follows:
@PersistenceContext (unitName="XXXmyapp_ejb3.jar#EJB3Persistence")
private EntityManager em;
and deploy the application, then everything works fine (have also attached the successful logs ConsoleLogs_Success.txt and serverLogs_Success.txt in the logs.zip file).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months