// Override
SecurityIdentityMetaData overrideEjbTimeout = new SecurityIdentityMetaData();
overrideEjbTimeout.setDescriptions(new DescriptionsImpl());
overrideEjbTimeout.setRunAsPrincipal("overrideRunAsPrincipal");
RunAsMetaData overrideRunAs = new RunAsMetaData();
overrideRunAs.setDescriptions(new DescriptionsImpl());
overrideRunAs.setRoleName("overrideRoleName");
overrideRunAs.setId("overrideId");
EmptyMetaData overrideEmpty = new EmptyMetaData();
overrideEmpty.setId("overrideId");
overrideEjbTimeout.setRunAs(overrideRunAs);
overrideEjbTimeout.setUseCallerIdentity(overrideEmpty);
JBossSessionBeanMetaData override = new JBossSessionBeanMetaData();
override.setEjbTimeoutIdentity(overrideEjbTimeout);
override.setName("overrideName");
// Original
SecurityIdentityMetaData originalEjbTimeout = new SecurityIdentityMetaData();
originalEjbTimeout.setRunAsPrincipal("originalRunAsPrincipal");
RunAsMetaData originalRunAs = new RunAsMetaData();
originalRunAs.setDescriptions(new DescriptionsImpl());
originalRunAs.setRoleName("originalRoleName");
originalRunAs.setId("originalId");
EmptyMetaData originalEmpty = new EmptyMetaData();
originalEmpty.setId("originalId");
originalEjbTimeout.setRunAs(originalRunAs);