Is there any documentation somewhere about the new design (I am talking about a broad overview rather than changes to specific classes)?<div><br></div><div>Stuart<br><br><div class="gmail_quote">On Thu Nov 27 2014 at 5:55:16 AM David M. Lloyd <<a href="mailto:david.lloyd@redhat.com">david.lloyd@redhat.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't want to commit this to a specific WildFly release but I guess<br>
and hope it'll come in around WildFly 10 or so (definitely not 9).<br>
<br>
As previously discussed, the EJB client architecture is undergoing the<br>
following substantial changes:<br>
<br>
• Introduction of URIAffinity, and URI-based invocation<br>
• Expansion of the 'ejb' JNDI initial context to auto-associate the<br>
PROVIDER_URL as the URI affinity for looked-up proxies<br>
• Elimination of all "nested" EJB client context functionality<br>
• Integration with Elytron for client identity management<br>
• Deferral to Remoting for automatic connection management<br>
• Unification of client configuration, so the Elytron authentication<br>
client, Remoting connection management, remote transaction client, and<br>
EJB client configurations all can be configured in one file or<br>
deployment descriptor<br>
<br>
As such, I've introduced a 2.x branch for upstream where continued<br>
development of the 2.x series will take place. The "master" branch is<br>
being re-purposed towards this new development, targeted for 3.x of this<br>
library.<br>
<br>
There are a number of compatibility considerations from 2.x to 3.x.<br>
Most (I hope) existing client code (which avoids specialized manual<br>
configuration or nested client contexts) should continue to function<br>
as-is, with the following exceptions:<br>
<br>
• The following classes and interfaces are currently removed in my<br>
working copy:<br>
• ClusterContext - replaced with discovery (?)<br>
• ClusterNodeManager - replaced with discovery<br>
<br>
• ClusterNodeSelector - replaced with discovery<br>
• DeploymentNodeSelector - replaced with discovery<br>
<br>
• ContextSelector - replaced with general selector class<br>
• ConstantContextSelector<br>
• IdentityEJBClientContextSelect<u></u>or<br>
• ThreadLocalContextSelector<br>
<br>
• EJBClientContextInitializer - no replacement<br>
• DefaultInterceptorsClientConte<u></u>xtInitializer<br>
• TransactionRecoveryContextInit<u></u>ializer<br>
<br>
• EJBClientContextIdentifier - no replacement<br>
• NamedEJBClientContextIdentifie<u></u>r<br>
<br>
• DefaultCallbackHandler - no replacement<br>
<br>
• EJBClientConfiguration - replaced with context builder<br>
• PropertiesBasedEJBClientConfig<u></u>uration<br>
<br>
• EJBClientContextListener - no replacement<br>
• EJBClientInterceptor.<u></u>Registration - no replacement (interceptor<br>
set cannot be changed)<br>
• EJBClient*TransactionContext - replaced by<br>
wildfly-transaction-client facility<br>
• EJBReceiverContext - no replacement<br>
• ReceiverInterceptor - no replacement (internal class)<br>
<br>
• ALL public classes in the org.jboss.ejb.client.remoting package<br>
including ReconnectHandler<br>
<br>
• The following changes will be made to these core classes and interfaces:<br>
• EJBClient<br>
• Added more createSession() variants to support new affinity types<br>
• Change createSession() methods to throw CreateException instead<br>
of Exception<br>
• Remove createProxy() and createSession() variants which accept<br>
EJBClientContextIdentifier<br>
• Remove getEJBClientContextIdentifierF<u></u>or() method<br>
• Attachable<br>
• Remove getAttachments() method<br>
• EJBClientContext<br>
• No longer implements Closeable<br>
• Remove close() method<br>
• Remove all static create() methods, replaced with Builder class<br>
• Remove finalize() method<br>
• Remove getClusterContext(), getEJBClientConfiguration(),<br>
getOrCreateClusterContext(), removeCluster()<br>
• Remove selector-related methods, replaced with general Selector<br>
class<br>
• Remove register*() and unregister*() methods (providers are<br>
added to Builder)<br>
• Remove require() method which accepts EJBClientContextIdentifier<br>
• Add getInvocationTimeout() method<br>
• Affinity<br>
• Add forUri() factory method<br>
• EJBClientInvocationContext<br>
• Add getCompressionLevel(), isClientAsync(), and isIdempotent()<br>
query methods<br>
• Remove finalize()<br>
• EJB*Locator classes<br>
• Additional constructors which also accept an affinity<br>
• Additional "copy" constructors which accept a locator and<br>
affinity, to change the target affinity<br>
• EJBReceiver class<br>
• openSession() method changed to accept a stateless EJB locator<br>
• Constructor changed to no args<br>
• Remove all send*() and other methods related to transactions<br>
• Remove associate(), getNodeName(), [de]registerModule(), exists()<br>
• EJBReceiverInvocationContext<br>
• Remove retryInvocation() method<br>
• Remove getEjbReceiverContext() method<br>
• Remove getNodeName() method<br>
• EJBMetaDataImpl<br>
• Deprecated, changed to not use raw types<br>
• RequestSendFailedException<br>
• Replaced constructor with standard exception four-constructor setup<br>
• The following API classes are added:<br>
• EJBClientPermission - a general permission class<br>
• AbstractEJBMetaData - type-safe hierarchical version of<br>
EJBMetaDataImpl<br>
• EJBClientContext.Builder - forwards-compatible builder for<br>
EJBClientContext<br>
• EJBDiscoveryProvider - an interface to provide pluggable discovery<br>
• EJBTransportProvider - an interface to provide URI-compatible<br>
transport (factory for EJBReceivers)<br>
• URIAffinity - a type of affinity which has a URI for a target<br>
<br>
Note in particular that most of the cluster-support infrastructure is<br>
presently removed with no replacement. It is my hope and intent that<br>
the discovery infrastructure will be able to take over this function.<br>
How much of the code will be new, compared to how much of the code can<br>
be forward-ported and reintroduced from 2.x, remains to be discussed.<br>
<br>
At present, the plan is for wire compatibility to be supported for 2.x<br>
clients talking to 3.x servers and vice-versa.<br>
<br>
Transaction handling will be relegated to a separate<br>
wildfly-transaction-client API. However the getUserTransaction(node)<br>
method will continue to be supported as a deprecated delegation to the<br>
transaction-client API. In addition, when talking to a 2.x server, it<br>
is expected that a wildfly-transaction-client SPI implementation will<br>
piggyback on the existing EJB protocol transaction messages.<br>
<br>
If any of these API changes seems unacceptable, now is the time to<br>
discuss it. All the code that was removed was determined to be tied too<br>
tightly to the previous location or configuration strategy, and thus<br>
couldn't sensibly be supported going forward. I have hopefully been<br>
adequately upfront about what I intended to remove or support going<br>
forward. In addition, by supporting the 2.x client, most migration<br>
concerns can hopefully be mitigated. But it's possible that some<br>
classes or methods could indeed be reintroduced with sensible semantics<br>
and in such a way as to not cause problems; if you have any thoughts<br>
along these lines, please share them and we can discuss them on a<br>
case-by-case basis.<br>
<br>
I've pushed up the proposed baseline 3.0 API at<br>
<a href="https://github.com/dmlloyd/jboss-ejb-client/tree/uri_invocation" target="_blank">https://github.com/dmlloyd/<u></u>jboss-ejb-client/tree/uri_<u></u>invocation</a> for<br>
review. I intend for pull requests that are relevant to both old and<br>
new code bases to be applied to both if possible, to avoid increasing<br>
the incompatibility window even further.<br>
<br>
--<br>
- DML<br>
______________________________<u></u>_________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/wildfly-dev</a></blockquote></div></div>