Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jdkorb #7008

Merged
merged 41 commits into from Jan 13, 2015
Merged

Jdkorb #7008

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fd71391
WFLY-1077 IIOP subsystem: Draft
tadamski Apr 11, 2014
bf31252
WFLY-1077 IIOP subsystem: PersistentServerId as subsystem configurati…
tadamski Apr 17, 2014
1fdd44a
WFLY-1077 IIOP subsystem: Make iiop integration tests and rmiiiop tck…
tadamski May 13, 2014
4383297
WFLY-1077 IIOP subsystem: Add dependencies to narayana-jts-idlj project
tadamski Jun 2, 2014
c59ed15
WFLY-1077 IIOP subsystem: Add openjdk-orb/remove rmi-api dependencies
tadamski Jun 6, 2014
8bbbc4c
WFLY-1077 IIOP subsystem: jboss-rmi and jboss-jdkorb merge
tadamski Jun 7, 2014
9225b9c
WFLY-1077 IIOP subsystem: SASCurrent and SSLPolicy generation moved t…
tadamski Jun 7, 2014
cbc151c
WFLY-1077 IIOP subsystem: Restore JdkORBSubsystemTestCase
tadamski Jun 7, 2014
1dc792b
WFLY-1077 IIOP subsystem: Refactor
tadamski Jun 7, 2014
87afab8
WFLY-1077 IIOP subsystem: Resolve initial references deadlod fix: Ini…
tadamski Jun 10, 2014
15044d7
WFLY-1077 IIOP subsystem: Switch to jdkorb in iiop integration tests
tadamski Jul 17, 2014
5afb330
WFLY-1077 IIOP subsystem: Make javax.orb.api dependent on jboss-trans…
tadamski Jul 17, 2014
4fda094
WFLY-1077 IIOP subsystem: Add SSL sockets to jdkorb
tadamski Jul 17, 2014
0ccca9c
WFLY-1077 IIOP subsystem: Configuration fix after rebase
tadamski Jul 22, 2014
1ebb810
WFLY-1077 IIOP subsystem: ejb3 subsystem fix after rebase
tadamski Jul 22, 2014
94d2536
WFLY-1077 IIOP subsystem: jdkorb subsystem fix after rebase
tadamski Jul 22, 2014
32c1531
WFLY-1077 IIOP subsystem: Refactor
tadamski Jul 31, 2014
cd5d7c8
WFLY-1077 IIOP subsystem: Configuration cleanup
tadamski Aug 4, 2014
4200a2f
WFLY-1077 IIOP subsystem: Make Ejb3SubsystemUnitTestCase run
tadamski Aug 4, 2014
24af0b9
WFLY-1077 IIOP subsystem: Remove transformers
tadamski Aug 5, 2014
46a4cd1
WFLY-1077 IIOP subsystem: Socket factory name refactor
tadamski Aug 13, 2014
36abcf1
WFLY-1077 IIOP subsystem: Add dependencies to javax.orb.api module
tadamski Aug 13, 2014
c0ebcb6
WFLY-1077 IIOP subsystem: Licenses
tadamski Aug 13, 2014
6fd41d1
WFLY-1077 IIOP subsystem: Fix naming tests
tadamski Aug 18, 2014
c50abbc
WFLY-1077 IIOP subsystem: Update openjdk-orb and narayana-jts-idlj ve…
tadamski Aug 19, 2014
e7aded6
WFLY-1077 IIOP subsystem: Add jdkorb subsystem xsd
tadamski Aug 19, 2014
8ac6e36
WFLY-1077 IIOP subsystem: Configurable naming root context name
tadamski Aug 21, 2014
0735660
WFLY-1077 IIOP subsystem: Make ORB always use remote invocation to av…
tadamski Aug 26, 2014
c18f162
WFLY-1077 IIOP subsystem: client transport requires-ssl configuration
tadamski Aug 28, 2014
643b7f3
WFLY-1077 IIOP subsystem: Persistent resource parsing
tadamski Sep 12, 2014
6bf0450
WFLY-1077 IIOP subsystem: Rename subsystem to iiop-openjdk + refactor
tadamski Sep 20, 2014
d9b6e09
WFLY-1077 IIOP subsystem: use security client-requires configuration …
tadamski Sep 22, 2014
0ff5bd7
WFLY-3893 JacORB compatibility subsystem draft
tadamski Sep 24, 2014
f31bc76
WFLY-1077 IIOP subsystem: Refactor
tadamski Sep 24, 2014
2ae1682
WFLY-1077 IIOP subsystem: Logger refactor
tadamski Sep 25, 2014
628590d
WFLY-3906 Upgraded openjdk-orb from 8.0.0.Beta1 to 8.0.1.Beta1.
tadamski Oct 22, 2014
2226740
WFLY-1077 IIOP subsystem: IORSecurityConfigMetaData construction quic…
tadamski Nov 1, 2014
5a52c94
WFLY-3903 merge
tadamski Nov 3, 2014
b6e7de0
WFLY-1077 Update openjdk-orb library
tadamski Nov 20, 2014
2847b06
WFLY-1077 IIOP subsystem: change packages from org.jboss.as to org.wi…
tadamski Nov 26, 2014
55b7fc1
WFLY-1077 IIOP subsystem: refactor
tadamski Dec 3, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions ejb3/pom.xml
Expand Up @@ -69,10 +69,10 @@ vi:ts=4:sw=4:expandtab
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ee</artifactId>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-jacorb</artifactId>
<artifactId>wildfly-iiop-openjdk</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -203,5 +203,11 @@ projects that depend on this project.-->
<artifactId>groovy-all</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.rmi</groupId>
<artifactId>jboss-rmi-api_1.0_spec</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Expand Up @@ -22,9 +22,10 @@

package org.jboss.as.ejb3.deployment.processors;

import static org.jboss.as.server.deployment.EjbDeploymentMarker.isEjbDeployment;

import org.jboss.as.ee.structure.DeploymentType;
import org.jboss.as.ee.structure.DeploymentTypeMarker;
import org.jboss.as.jacorb.deployment.JacORBDeploymentMarker;
import org.jboss.as.server.deployment.Attachments;
import org.jboss.as.server.deployment.DeploymentPhaseContext;
import org.jboss.as.server.deployment.DeploymentUnit;
Expand All @@ -35,8 +36,7 @@
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoader;

import static org.jboss.as.server.deployment.EjbDeploymentMarker.isEjbDeployment;
import org.wildfly.iiop.openjdk.deployment.IIOPDeploymentMarker;

/**
* Responsible for adding appropriate Java EE {@link org.jboss.as.server.deployment.module.ModuleDependency module dependencies}
Expand All @@ -52,7 +52,7 @@ public class EjbDependencyDeploymentUnitProcessor implements DeploymentUnitProce
private static final ModuleIdentifier EJB_SUBSYSTEM = ModuleIdentifier.create("org.jboss.as.ejb3");
private static final ModuleIdentifier EJB_CLIENT = ModuleIdentifier.create("org.jboss.ejb-client");
private static final ModuleIdentifier EJB_IIOP_CLIENT = ModuleIdentifier.create("org.jboss.iiop-client");
private static final ModuleIdentifier JACORB = ModuleIdentifier.create("org.jboss.as.jacorb");
private static final ModuleIdentifier IIOP_OPENJDK = ModuleIdentifier.create("org.wildfly.iiop-openjdk");
private static final ModuleIdentifier EJB_API = ModuleIdentifier.create("javax.ejb.api");


Expand Down Expand Up @@ -82,9 +82,9 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
//we always have to add this, as even non-ejb deployments may still lookup IIOP ejb's
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, EJB_SUBSYSTEM, false, false, true, false));

if (JacORBDeploymentMarker.isJacORBDeployment(deploymentUnit)) {
if (IIOPDeploymentMarker.isIIOPDeployment(deploymentUnit)) {
//needed for dynamic IIOP stubs
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JACORB, false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, IIOP_OPENJDK, false, false, false, false));
}

// fetch the EjbJarMetaData
Expand Down
Expand Up @@ -21,7 +21,6 @@
*/
package org.jboss.as.ejb3.deployment.processors;


import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
Expand All @@ -47,16 +46,6 @@
import org.jboss.as.ejb3.iiop.EjbIIOPTransactionInterceptor;
import org.jboss.as.ejb3.iiop.POARegistry;
import org.jboss.as.ejb3.subsystem.IIOPSettingsService;
import org.jboss.as.jacorb.deployment.JacORBDeploymentMarker;
import org.jboss.as.jacorb.rmi.AttributeAnalysis;
import org.jboss.as.jacorb.rmi.InterfaceAnalysis;
import org.jboss.as.jacorb.rmi.OperationAnalysis;
import org.jboss.as.jacorb.rmi.RMIIIOPViolationException;
import org.jboss.as.jacorb.rmi.marshal.strategy.SkeletonStrategy;
import org.jboss.as.jacorb.service.CorbaNamingService;
import org.jboss.as.jacorb.service.CorbaORBService;
import org.jboss.as.jacorb.service.CorbaPOAService;
import org.jboss.as.jacorb.service.IORSecConfigMetaDataService;
import org.jboss.as.server.Services;
import org.jboss.as.server.deployment.DeploymentPhaseContext;
import org.jboss.as.server.deployment.DeploymentUnit;
Expand All @@ -77,6 +66,16 @@
import org.omg.CORBA.ORB;
import org.omg.CosNaming.NamingContextExt;
import org.omg.PortableServer.POA;
import org.wildfly.iiop.openjdk.deployment.IIOPDeploymentMarker;
import org.wildfly.iiop.openjdk.rmi.AttributeAnalysis;
import org.wildfly.iiop.openjdk.rmi.InterfaceAnalysis;
import org.wildfly.iiop.openjdk.rmi.OperationAnalysis;
import org.wildfly.iiop.openjdk.rmi.RMIIIOPViolationException;
import org.wildfly.iiop.openjdk.rmi.marshal.strategy.SkeletonStrategy;
import org.wildfly.iiop.openjdk.service.CorbaNamingService;
import org.wildfly.iiop.openjdk.service.CorbaORBService;
import org.wildfly.iiop.openjdk.service.CorbaPOAService;
import org.wildfly.iiop.openjdk.service.IORSecConfigMetaDataService;

/**
* This is the DUP that sets up IIOP for EJB's
Expand All @@ -92,8 +91,9 @@ public EjbIIOPDeploymentUnitProcessor(final IIOPSettingsService settingsService)
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {


final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!JacORBDeploymentMarker.isJacORBDeployment(deploymentUnit)) {
if (!IIOPDeploymentMarker.isIIOPDeployment(deploymentUnit)) {
return;
}

Expand All @@ -102,6 +102,7 @@ public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentU
return;
}


// a bean-name -> IIOPMetaData map, reflecting the assembly descriptor IIOP configuration.
Map<String, IIOPMetaData> iiopMetaDataMap = new HashMap<String, IIOPMetaData>();
final EjbJarMetaData ejbMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
Expand Down Expand Up @@ -152,6 +153,7 @@ private void processEjb(final EJBComponentDescription componentDescription, fina

// Create bean method mappings for container invoker


final EJBViewDescription remoteView = componentDescription.getEjbRemoteView();
final ClassIndex remoteClass;
try {
Expand All @@ -167,6 +169,7 @@ private void processEjb(final EJBComponentDescription componentDescription, fina
throw EjbLogger.ROOT_LOGGER.failedToLoadViewClassForComponent(e, componentDescription.getEJBClassName());
}


componentDescription.getEjbHomeView().getConfigurators().add(new IIOPInterceptorViewConfigurator());
componentDescription.getEjbRemoteView().getConfigurators().add(new IIOPInterceptorViewConfigurator());

Expand Down Expand Up @@ -245,6 +248,7 @@ private void processEjb(final EJBComponentDescription componentDescription, fina
// Initialize repository ids of home interface
final String[] homeRepositoryIds = homeInterfaceAnalysis.getAllTypeIds();


final EjbIIOPService service = new EjbIIOPService(beanMethodMap, beanRepositoryIds, homeMethodMap, homeRepositoryIds,
settingsService.isUseQualifiedName(), iiopMetaData, module);
final ServiceBuilder<EjbIIOPService> builder = serviceTarget.addService(componentDescription.getServiceName().append(EjbIIOPService.SERVICE_NAME), service);
Expand Down
Expand Up @@ -28,8 +28,6 @@
import org.jboss.as.ee.structure.DeploymentType;
import org.jboss.as.ee.structure.DeploymentTypeMarker;
import org.jboss.as.ejb3.iiop.handle.HandleDelegateImpl;
import org.jboss.as.jacorb.deployment.JacORBDeploymentMarker;
import org.jboss.as.jacorb.service.CorbaORBService;
import org.jboss.as.naming.ManagedReferenceInjector;
import org.jboss.as.naming.ServiceBasedNamingStore;
import org.jboss.as.naming.ValueManagedReferenceFactory;
Expand All @@ -44,6 +42,8 @@
import org.jboss.msc.service.ServiceTarget;
import org.jboss.msc.value.ImmediateValue;
import org.omg.CORBA.ORB;
import org.wildfly.iiop.openjdk.deployment.IIOPDeploymentMarker;
import org.wildfly.iiop.openjdk.service.CorbaORBService;

/**
* Processor responsible for binding IIOP related resources to JNDI.
Expand All @@ -65,7 +65,7 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
}

//do not bind if jacORB not present
if (!JacORBDeploymentMarker.isJacORBDeployment(deploymentUnit)) {
if (!IIOPDeploymentMarker.isIIOPDeployment(deploymentUnit)) {
return;
}

Expand Down
Expand Up @@ -42,9 +42,7 @@
import org.jboss.as.ee.component.ComponentView;
import org.jboss.as.ejb3.component.entity.EntityBeanComponent;
import org.jboss.as.ejb3.component.stateful.StatefulSessionComponent;
import org.jboss.as.jacorb.csiv2.idl.SASCurrent;
import org.jboss.as.jacorb.rmi.RmiIdlUtil;
import org.jboss.as.jacorb.rmi.marshal.strategy.SkeletonStrategy;
import org.jboss.iiop.csiv2.SASCurrent;
import org.jboss.as.naming.context.NamespaceContextSelector;
import org.jboss.ejb.client.SessionID;
import org.jboss.ejb.iiop.HandleImplIIOP;
Expand All @@ -70,6 +68,8 @@
import org.omg.PortableServer.CurrentPackage.NoContext;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.Servant;
import org.wildfly.iiop.openjdk.rmi.RmiIdlUtil;
import org.wildfly.iiop.openjdk.rmi.marshal.strategy.SkeletonStrategy;
import org.wildfly.security.manager.WildFlySecurityManager;

/**
Expand Down
26 changes: 13 additions & 13 deletions ejb3/src/main/java/org/jboss/as/ejb3/iiop/EjbIIOPService.java
Expand Up @@ -32,18 +32,12 @@
import javax.ejb.EJBMetaData;
import javax.rmi.PortableRemoteObject;

import org.jacorb.ssl.SSLPolicyValue;
import org.jacorb.ssl.SSLPolicyValueHelper;
import org.jacorb.ssl.SSL_POLICY_TYPE;
import org.jboss.as.ee.component.ComponentView;
import org.jboss.as.ejb3.logging.EjbLogger;
import org.jboss.as.ejb3.component.EJBComponent;
import org.jboss.as.ejb3.component.entity.EntityBeanComponent;
import org.jboss.as.ejb3.component.stateless.StatelessSessionComponent;
import org.jboss.as.ejb3.iiop.stub.DynamicStubFactoryFactory;
import org.jboss.as.jacorb.csiv2.CSIv2Policy;
import org.jboss.as.jacorb.rmi.ir.InterfaceRepository;
import org.jboss.as.jacorb.rmi.marshal.strategy.SkeletonStrategy;
import org.jboss.as.server.moduleservice.ServiceModuleLoader;
import org.jboss.ejb.client.EJBHomeLocator;
import org.jboss.ejb.client.EJBLocator;
Expand Down Expand Up @@ -85,8 +79,13 @@
import org.omg.PortableServer.Current;
import org.omg.PortableServer.CurrentHelper;
import org.omg.PortableServer.POA;
import org.wildfly.iiop.openjdk.csiv2.CSIv2Policy;
import org.wildfly.iiop.openjdk.rmi.ir.InterfaceRepository;
import org.wildfly.iiop.openjdk.rmi.marshal.strategy.SkeletonStrategy;
import org.wildfly.security.manager.WildFlySecurityManager;

import com.sun.corba.se.spi.extension.ZeroPortPolicy;

/**
* This is an IIOP "proxy factory" for <code>EJBHome</code>s and
* <code>EJBObject</code>s. Rather than creating Java proxies (as the JRMP
Expand Down Expand Up @@ -236,6 +235,7 @@ public EjbIIOPService(final Map<String, SkeletonStrategy> beanMethodMap, final S

public synchronized void start(final StartContext startContext) throws StartException {


try {
final RiverMarshallerFactory factory = new RiverMarshallerFactory();
final MarshallingConfiguration configuration = new MarshallingConfiguration();
Expand Down Expand Up @@ -265,6 +265,7 @@ public synchronized void start(final StartContext startContext) throws StartExce
}
name = name.replace(".", "_");


final ORB orb = this.orb.getValue();
if (interfaceRepositorySupported) {
// Create a CORBA interface repository for the enterprise bean
Expand All @@ -288,22 +289,20 @@ public synchronized void start(final StartContext startContext) throws StartExce
final Any secPolicy = orb.create_any();
secPolicy.insert_Value(iorSecurityConfigMetaData);
Policy csiv2Policy = orb.create_policy(CSIv2Policy.TYPE, secPolicy);

policyList.add(csiv2Policy);

// Create SSLPolicy (SSL_REQUIRED ensures home and remote IORs will have port 0 in the primary address).
// Add ZeroPortPolicy if ssl is required (it ensures home and remote IORs will have port 0 in the primary address).
boolean sslRequired = false;
if (iorSecurityConfigMetaData != null && iorSecurityConfigMetaData.getTransportConfig() != null) {
IORTransportConfigMetaData tc = iorSecurityConfigMetaData.getTransportConfig();
sslRequired = IORTransportConfigMetaData.INTEGRITY_REQUIRED.equals(tc.getIntegrity())
|| IORTransportConfigMetaData.CONFIDENTIALITY_REQUIRED.equals(tc.getConfidentiality())
|| IORTransportConfigMetaData.ESTABLISH_TRUST_IN_CLIENT_REQUIRED.equals(tc.getEstablishTrustInClient());
}
final Any sslPolicyValue = orb.create_any();
SSLPolicyValueHelper.insert(sslPolicyValue, (sslRequired) ? SSLPolicyValue.SSL_REQUIRED : SSLPolicyValue.SSL_NOT_REQUIRED);
Policy sslPolicy = orb.create_policy(SSL_POLICY_TYPE.value, sslPolicyValue);
policyList.add(sslPolicy);

EjbLogger.ROOT_LOGGER.debugf("container's SSL policy: %s", sslPolicy);
if(sslRequired){
policyList.add(ZeroPortPolicy.getPolicy());
}
}

String securityDomain = "CORBA_REMOTE"; //TODO: what should this default to
Expand Down Expand Up @@ -508,6 +507,7 @@ public static synchronized void rebind(final NamingContextExt ctx, final String
final NameComponent[] name = ctx.to_name(strName);
NamingContext intermediateCtx = ctx;


for (int i = 0; i < name.length - 1; i++) {
final NameComponent[] relativeName = new NameComponent[]{name[i]};
try {
Expand Down
Expand Up @@ -30,12 +30,12 @@
import org.jboss.as.ejb3.logging.EjbLogger;
import org.jboss.as.ejb3.component.EJBComponent;
import org.jboss.as.ejb3.component.MethodIntf;
import org.jboss.as.jacorb.tm.ForeignTransaction;
import org.jboss.as.jacorb.tm.TxServerInterceptor;
import org.jboss.invocation.ImmediateInterceptorFactory;
import org.jboss.invocation.Interceptor;
import org.jboss.invocation.InterceptorContext;
import org.jboss.invocation.InterceptorFactory;
import org.wildfly.iiop.openjdk.tm.ForeignTransaction;
import org.wildfly.iiop.openjdk.tm.TxServerInterceptor;

/**
* @author Stuart Douglas
Expand Down
2 changes: 1 addition & 1 deletion ejb3/src/main/java/org/jboss/as/ejb3/iiop/POARegistry.java
Expand Up @@ -103,7 +103,7 @@ public synchronized void start(final StartContext startContext) throws StartExce
// Policies for per-servant transient POAs
transientPoaPolicies = new Policy[]{rootPOA.create_lifespan_policy(
LifespanPolicyValue.TRANSIENT),
rootPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID),
rootPOA.create_id_assignment_policy(IdAssignmentPolicyValue.SYSTEM_ID),
rootPOA.create_servant_retention_policy(ServantRetentionPolicyValue.NON_RETAIN),
rootPOA.create_request_processing_policy(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT),
rootPOA.create_id_uniqueness_policy( IdUniquenessPolicyValue.MULTIPLE_ID),
Expand Down
Expand Up @@ -27,7 +27,7 @@
import org.jboss.as.ejb3.deployment.DeploymentRepository;
import org.jboss.as.ejb3.deployment.EjbDeploymentInformation;
import org.jboss.as.ejb3.deployment.ModuleDeployment;
import org.jboss.com.sun.corba.se.impl.javax.rmi.RemoteObjectSubstitution;
import org.jboss.javax.rmi.RemoteObjectSubstitution;
import org.jboss.ejb.client.EJBClient;
import org.jboss.ejb.client.EJBHandle;
import org.jboss.ejb.client.EJBHomeHandle;
Expand All @@ -54,6 +54,8 @@ public class RemoteObjectSubstitutionService implements RemoteObjectSubstitution

@Override
public Object writeReplaceRemote(final Object object) {


final DeploymentRepository deploymentRepository = deploymentRepositoryInjectedValue.getOptionalValue();
//if we are not started yet just return
if (deploymentRepository == null) {
Expand Down