-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from dmlloyd/misc-fixes
Miscellaneous fixes
- Loading branch information
Showing
12 changed files
with
216 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,25 +25,35 @@ | |
import javax.transaction.RollbackException; | ||
import javax.transaction.SystemException; | ||
|
||
import org.jboss.ejb.client.TransactionID; | ||
import org.jboss.ejb.client.UserTransactionID; | ||
import org.jboss.marshalling.Marshalling; | ||
import org.jboss.marshalling.Unmarshaller; | ||
import org.jboss.remoting3.MessageInputStream; | ||
import org.jboss.remoting3.MessageOutputStream; | ||
import org.jboss.remoting3.util.BlockingInvocation; | ||
import org.jboss.remoting3.util.InvocationTracker; | ||
import org.wildfly.transaction.client._private.Log; | ||
import org.wildfly.transaction.client.provider.remoting.SimpleIdResolver; | ||
import org.wildfly.transaction.client.spi.SimpleTransactionControl; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
*/ | ||
class EJBSimpleTransactionControl implements SimpleTransactionControl { | ||
private final EJBClientChannel channel; | ||
private final TransactionID transactionID; | ||
private final UserTransactionID transactionID; | ||
private final SimpleIdResolver simpleIdResolver; | ||
|
||
EJBSimpleTransactionControl(final EJBClientChannel channel) { | ||
this.channel = channel; | ||
this.transactionID = channel.allocateUserTransactionID(); | ||
final UserTransactionID transactionID = channel.allocateUserTransactionID(); | ||
this.transactionID = transactionID; | ||
simpleIdResolver = connection -> { | ||
if (channel.getChannel().getConnection() != connection) { | ||
throw Log.log.invalidTransactionConnection(); | ||
} | ||
return transactionID.getId(); | ||
}; | ||
} | ||
|
||
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException { | ||
|
@@ -128,6 +138,9 @@ static SystemException readAppException(final EJBClientChannel channel, final Bl | |
} | ||
|
||
public <T> T getProviderInterface(final Class<T> providerInterfaceType) { | ||
if (providerInterfaceType.isAssignableFrom(SimpleIdResolver.class)) { | ||
return providerInterfaceType.cast(simpleIdResolver); | ||
} | ||
return null; | ||
} | ||
} |
33 changes: 0 additions & 33 deletions
33
src/main/java/org/jboss/ejb/protocol/remote/RemoteClusteredEJBDiscoveryConfigurator.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.