Corba refactoring, ORB updated to 5.0.1#25804
Conversation
e4d5cc5 to
ae5e0d2
Compare
|
FIXME: In #25790 I have collided with incorrect CORBA lifecycle, which can leave "zombie ports" open after shutdown. I added just some fixme to the code, and three partial workarounds to avoid it. Part of the problem could be also tests which probably don't close sockets too. The server part should be addressed in this PR - as I already refactored it a lot, it should be easier to add those sockets to some list, so they could be safely closed regardless on which other threads are using them. |
14a8fe1 to
355474a
Compare
f635b9f to
dbb9566
Compare
4585886 to
87422cf
Compare
ebeee10 to
e518f9d
Compare
|
@eclipse-ee4j/ee4j-glassfish-committers you can review, just don't merge it until we release new corba-orb lib. |
|
The last failing test is fixed here: |
- Fixed bug I made in 2024-02 in 6f6b961 which destroyed ORB restarts. Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
This is what I am running locally. The
ejb_group_2is another option.Depends On
AI-generated summary of changes
Here's the grouped summary of changes across 88 files:
CI/Build (
Jenkinsfile,.github/workflows/*.yml,gftest.sh,pom.xmlfiles)Added
-PsnapshotsMaven profile to all CI build commands, and bumpedglassfish-corba.versionfrom5.0.0to5.1.0-SNAPSHOTinnucleus/parent/pom.xml.Core architectural change:
GlassFishORBHelperdeleted, replaced byGlassFishORBLocator+OrbInitializationNodeGlassFishORBHelper.javaandGlassFishORBLifeCycleListener.javaare fully removed. A newGlassFishORBLocatorreplaces the helper with cleaner ORB lifecycle management, proper failure tracking, and thread-local support for partially-initialized ORB during startup. A newOrbInitializationNodesingleton holds the acceptor delegate to break a cyclic HK2 dependency.ORB creation refactored:
GlassFishORBManager→OrbCreator+GlassFishOrbImplGlassFishORBManageris massively simplified — ORB creation logic extracted into a newOrbCreatorclass. A newGlassFishOrbImplextendsORBImpldirectly (instead of usingORBFactory), and is now the registered ORB class (org.omg.CORBA.ORBClass). This fixes the ORB restart bug from 2024, introduced by commit 6f6b961.Lazy ORB service:
ORBLazyServiceInitializerreplaced byORBLazyServiceNew implementation uses
OrbInitializationNode.canHandleRequest()instead of the oldSelectableChannelDelegate, with a spin-wait loop and deadlock detection/logging.GlassFishORBFactoryinterface cleaned upRemoved
getCSIv2PolicyType(),getORBHost(),getORBPort(). AddedgetEjbDescriptor(IORInfo)to move EJB descriptor lookup out ofCSIV2TaggedComponentInfo.ORBLocatorinterface also dropsgetORBPort()/getORBHost().All consumers migrated from
GlassFishORBHelpertoGlassFishORBLocatororORBLocatorAffects:
EjbContainerUtil,EjbContainerUtilImpl,BaseContainer,EJBObjectInputStreamHandler,EJBObjectOutputStreamHandler,EjbNamingReferenceManagerImpl,MessageBeanContainer,SecurityContextUtil,SecurityMechanismSelector,SecIORInterceptor,SecClientRequestInterceptor,SecServerRequestInterceptor,SecurityIIOPInterceptorFactory,TransactionServerInterceptor,TransactionInterceptorFactory,TransactionIIOPInterceptorFactory,TxIORInterceptor,TransactionServiceProperties,ORBNamingProxy,AppClientContainerBuilder,TargetServerHelper.IIOPSSLUtilinterface cleaned upRemoved
getAppClientSSL()/setAppClientSSL()(app client SSL now goes throughSSLUtilsdirectly). Method signatures use concrete types instead ofObject.IIOPUtilscleaned upRemoved static singleton pattern (
getInstance()/setInstance()), removedsetORB()/getORB(), removedGlassFishORBLifeCycleListenersupport. Now usesGlobals.get()for lookup.CSIV2TaggedComponentInfoandSecIORInterceptorrefactoredgetEjbDescriptor()moved toGlassFishORBFactory.createSecurityTaggedComponent(int sslPort)now takes explicitPropertiesinstead of fetching fromorbHelper.SecIORInterceptornow injectsGlassFishORBLocatordirectly.PEORBConfiguratorsimplifiedRemoved static
threadpoolMgrandsetThreadPoolManager(). Thread pool is now set directly fromS1ASThreadPoolManager.setORB()callback toGlassFishORBHelperremoved; replaced withGlassFishORBLocator.setThreadLocal(orb).MessageBeanContainer: Removed explicitinitializeProtocolManager()call — ORB is now initialized lazily on demand.AppClientDeployer: Added null check beforeclearArtifacts()to fix NPE.AppClientHTTPAdapter: Replaced NPE-catching workaround with null check ongetIIOPEndpoints()result.Tests: Replaced hardcoded
"localhost"withNetUtils.getHostName()in IIOP listener tests. Updated ORB class references fromcom.sun.corba.ee.impl.orb.ORBImpltoGlassFishOrbImplin standalone client tests.Misc cleanup across many files:
StringBuffer→StringBuilder, raw types → generics,java.util.logging→System.Logger, removed dead code, added@Overrideannotations,e.printStackTrace()→ proper logging.