{"action":"created","issue":{"url":"https://api.github.com/repos/wildfly/wildfly/issues/7929","labels_url":"https://api.github.com/repos/wildfly/wildfly/issues/7929/labels{/name}","comments_url":"https://api.github.com/repos/wildfly/wildfly/issues/7929/comments","events_url":"https://api.github.com/repos/wildfly/wildfly/issues/7929/events","html_url":"https://github.com/wildfly/wildfly/pull/7929","id":100815047,"number":7929,"title":"WFLY-5091 User supplied externalizers are ignored by web/ejb clustering code","user":{"login":"pferraro","id":352192,"avatar_url":"https://avatars.githubusercontent.com/u/352192?v=3","gravatar_id":"","url":"https://api.github.com/users/pferraro","html_url":"https://github.com/pferraro","followers_url":"https://api.github.com/users/pferraro/followers","following_url":"https://api.github.com/users/pferraro/following{/other_user}","gists_url":"https://api.github.com/users/pferraro/gists{/gist_id}","starred_url":"https://api.github.com/users/pferraro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pferraro/subscriptions","organizations_url":"https://api.github.com/users/pferraro/orgs","repos_url":"https://api.github.com/users/pferraro/repos","events_url":"https://api.github.com/users/pferraro/events{/privacy}","received_events_url":"https://api.github.com/users/pferraro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":69,"created_at":"2015-08-13T16:39:16Z","updated_at":"2015-08-24T11:59:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wildfly/wildfly/pulls/7929","html_url":"https://github.com/wildfly/wildfly/pull/7929","diff_url":"https://github.com/wildfly/wildfly/pull/7929.diff","patch_url":"https://github.com/wildfly/wildfly/pull/7929.patch"},"body":"https://issues.jboss.org/browse/WFLY-5091\r\n\r\nThe common misperception that users of distributed web applications, is that their session attributes are stored in an Infinispan cache, and thus, they can use Infinispan externalizers to optimize the marshalling of their session attributes.  However, in reality, user session attributes are stored within a MarshalledValue, which itself is stored in the Infinispan cache, and the clustering integration code performs marshalling lazily via JBoss Marshalling.\r\n\r\nThe primary goal of this PR is to allow applications to define their own externalizers, thus allow them to both optimize their application's performance in a clustered environment, and to use non-serializable objects in the HttpSession.  These externalizers are generic to both Infinispan and JBoss Marshalling, and are adapted to either, depending on the use case.\r\n\r\nTo accomplish this, this PR splits the existing org.wildfly.clustering.marshalling module (new since WF8) into 2: org.wildfly.clustering.marshalling.api, containing public marshalling API (currently a single interface), and org.wildfly.clustering.marshalling.jboss, containing JBoss Marshalling integration code.  The new Externalizer interface (from org.wildfly.clustering.marshalling.api) is consumed by both Infinispan's marshaller, via the AdvancedExternalizerAdapter, and via JBoss Marshalling via ExternalizerObjectTable, which uses a ServiceLoader to discover instances of Externalizer accessible from a given module.\r\n\r\nThis PR also adds new marshalling configuration verions for web, sso, and ejb that leverage the new ExternalizerObjectTable.\r\nOther improvements/changes to marshalling integration include:\r\n* Modify all existing externalizers to implement org.wildfly.clustering.marshalling.Externalizer instead of org.wildfly.clustering.infinispan.spi.io.SimpleExternalizer (which was an extension of Infinispan's AdvancedExternalizer)\r\n* Rename VersionedMarshallingConfiguration to MarshallingConfigurationRepository to better describe its usage\r\n* Consolidate assorted implementations of MarshallingConfigurationRepository (formerly VersionedMarshallingConfiguration) into a single, generic implementation, i.e. SimpleMarshallingConfigurationRepository.\r\n* Allow marshalling configuration versions to be specified via enum\r\n* Allow ObjectTable and ClassTable instances to be configured with a specific Externalizer<Integer> for marshalling the table index. \r\n* IndexExternalizer contains a set of Externalizer<Integer> implementations for marshalling unsigned integer values, including a variable-length strategy, based on logic from Infinispan - useful for minimizing the serialized size of the index when the size of the object/class table is unknown."},"comment":{"url":"https://api.github.com/repos/wildfly/wildfly/issues/comments/134166031","html_url":"https://github.com/wildfly/wildfly/pull/7929#issuecomment-134166031","issue_url":"https://api.github.com/repos/wildfly/wildfly/issues/7929","id":134166031,"user":{"login":"wildfly-ci","id":939955,"avatar_url":"https://avatars.githubusercontent.com/u/939955?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly-ci","html_url":"https://github.com/wildfly-ci","followers_url":"https://api.github.com/users/wildfly-ci/followers","following_url":"https://api.github.com/users/wildfly-ci/following{/other_user}","gists_url":"https://api.github.com/users/wildfly-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly-ci/subscriptions","organizations_url":"https://api.github.com/users/wildfly-ci/orgs","repos_url":"https://api.github.com/users/wildfly-ci/repos","events_url":"https://api.github.com/users/wildfly-ci/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly-ci/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T11:59:46Z","updated_at":"2015-08-24T11:59:46Z","body":"**Linux** [Build 7751](http://brontes.lab.eng.brq.redhat.com/viewLog.html?buildId=66984&buildTypeId=WFPR) is now running using a merge of 7c47907627f75e73e6675d803d6c57967b97e4ef\n"}}