Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cu-dev] JNDI search in ContextServiceDefinitionBean
  • From: Nathan Rauh <nathan.rauh@xxxxxxxxxx>
  • Date: Mon, 28 Mar 2022 20:49:33 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=us.ibm.com; dmarc=pass action=none header.from=us.ibm.com; dkim=pass header.d=us.ibm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zkcw2K9/MNVQEKe99b2xfes13v0STEsIIpeskiOBSKI=; b=Gcx8NXlub3pEVBiYFdrVrImcpEbP+O3NSyNzj91k26BAoMHnpqvELRvMCFNIkvXnny8L/dSf5y0mHTAVdU+B1JQZrcdo+hf84SFvjzXo9N/OO+MZCWIfKUvLtVqDSXmnYDFTERXJhoOcW7NNh8Va8H6RhvSYb0fpHpuHbuqjLXhnw2nFAR7/HFxeg5V+6FJXmev35Udbkx4rriFcHvXJac/Dnr95DAhev4nyn0ZdT5qkSWCYAoHZa6XyUTgQG6FIkAaD31xJ78J+OOfWNcg29U1J4A99zzYSAHyofCQt6W5J/rXuJfoYqaNrwAHSE5P7QHoC34WpeLyyi54w+WiALg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TBqaJ6VzGRx9vXYShbfccbFCU5sVryW+9dHWj6PfdOz3NdL3MaPXhiweBChOHyYVbCuYfVP0BYi8h4iDKwfYR8+cLJn63V12mrrknLvV4HtDJDY0xKHCXcSfd4gYomEidqHvl31R01xoeVL6p6f22YWbB4EhMxCnJ9ENDdGI/cmRTwE5wNXWrIRMyFrlfpSCzV9W71goJflacpjeNup04N2zet/F9rx0ei5GPGxCO2kPPccnXhyFxSby4htS+yPNmkIwLCvzzVnQAZ5GmCeEesDm/fsgKqirr87BScq7BeuiDZctv67lq3Ib6a5nuYAno//mBmpDDO23GRhbaMRrXw==
  • Delivered-to: cu-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/cu-dev/>
  • List-help: <mailto:cu-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cu-dev>, <mailto:cu-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cu-dev>, <mailto:cu-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHYQHrDK0WjReFtu0SCe05ztwkyU6zQQjWAgASzq4A=
  • Thread-topic: [EXTERNAL] [cu-dev] JNDI search in ContextServiceDefinitionBean

I created pulls for both options and can merge either depending on which approach the community prefers.  I’ll plan to merge whichever gets more votes in favor (approved reviews) with no dissenting reviews,

 

removal of dead code:

https://github.com/eclipse-ee4j/concurrency-api/pull/199

 

make into valid test and enable:

https://github.com/eclipse-ee4j/concurrency-api/pull/200

 

 

From: Nathan Rauh <nathan.rauh@xxxxxxxxxx>
Date: Friday, March 25, 2022 at 4:01 PM
To: cu developer discussions <cu-dev@xxxxxxxxxxx>
Subject: Re: [EXTERNAL] [cu-dev] JNDI search in ContextServiceDefinitionBean

 

Petr,

 

Thanks for spotting that, it is clearly looking up the wrong JNDI name. My initial reaction was how can that possibly be passing when I run the TCK with Open Liberty?

After investigating, it turns out that it isn’t passing.  Instead, it isn’t running that code at all because it’s unreachable.

 

I recall that when reviewing the new EJB tests earlier this year, I had spotted a couple of occurrences of dead code that the developer had copied over from the servlet tests for use as a starting point/reference for writing some similar EJB tests.  The dead code that I spotted at that time was removed. However, it looks like this is some additional dead code from that point which went unnoticed until now.

 

Just for fun, I added some code to enable it locally and was happy to confirm that Open Liberty does indeed fail when trying to run with that incorrect JNDI name,

javax.naming.NameNotFoundException: java:comp/concurrent/ContextB

 

While we could opt to try to make this into a new working test (which would require more than just correcting the JNDI name because assertions would also need to match the different configuration within the EJB), I don’t see any point in that given that there is already other coverage in both EJBs and servlets.  Let’s just remove it.

 

 

From: cu-dev <cu-dev-bounces@xxxxxxxxxxx> on behalf of Petr Aubrecht <aubrecht@xxxxxxxxxxxx>
Reply-To: cu developer discussions <cu-dev@xxxxxxxxxxx>
Date: Friday, March 25, 2022 at 2:01 PM
To: "cu-dev@xxxxxxxxxxx" <cu-dev@xxxxxxxxxxx>
Subject: [EXTERNAL] [cu-dev] JNDI search in ContextServiceDefinitionBean

 

Hello,

I would like to ask you for help -- ContextServiceDefinitionBean class defines ContextB with this name:

@ContextServiceDefinition(name = "java:module/concurrent/ContextB",...

But it looks up in this way:

InitialContext.doLookup("java:comp/concurrent/ContextB");

Shouldn't the names match? Or is the module/comp mismatch intentional?

 

We tried to fix it (using java:module for both) and this tests works:

https://github.com/aubi/concurrency-api/pull/1/commits/fd0c15a35c29d14683e1d6369f27a6b470cc193f

Thank you

Petr


Back to the top