[
https://issues.apache.org/jira/browse/TOMEE-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved TOMEE-599.
-----------------------------------
Resolution: Auto Closed
Hi there!
We wanted to reach out and let you know that we're currently working on
cleaning up open issues in Jira that specifically impact unsupported versions,
including 1.7.x, 7.0.x, and 7.1.x.
If you had previously reported this issue on one of these unsupported versions,
we kindly ask you to check if the problem still persists and can be reproduced
on a supported version such as 8.0.x or 9.0.x. If you find that it is indeed
reproducible on a supported version, you're more than welcome to re-open this
issue.
Thanks!
> TomEE exposing Remote JNDI names not per
> -----------------------------------------
>
> Key: TOMEE-599
> URL: https://issues.apache.org/jira/browse/TOMEE-599
> Project: TomEE
> Issue Type: Bug
> Components: Compliance Checks
> Affects Versions: 1.5.0
> Reporter: John D. Ament
> Priority: Major
>
> Section 4.4.2.2 of the EJB 3.1 spec states that the following JNDI locations
> should be populated for "other client views," which includes remote. TomEE
> is instead exposing it as BeanName + Remote.
> This was shown with the following test material
> @Remote
> public interface RemoteDatabaseIntegrator {
> public void runQuery(String query) throws SQLException;
> }
> @Remote(RemoteDatabaseIntegrator.class)
> @Stateless(name="RemoteDatabaseIntegrator")
> public class RemoteDatabaseIntegratorImpl implements RemoteDatabaseIntegrator
> {
> @Resource(name="jdbc/AppDS")
> private DataSource ds;
> private Connection conn;
> @PostConstruct
> public void init() throws SQLException {
> this.conn = ds.getConnection();
> }
> @PreDestroy
> public void cleanup() throws SQLException {
> this.conn.close();
> }
> public void runQuery(String query) throws SQLException {
> this.conn.createStatement().execute(query);
> }
> }
> @RunWith(Arquillian.class)
> @RunAsClient
> public class RemoteDatabaseIntegratorTest {
> @Deployment(testable=false)
> public static JavaArchive createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class,"test.jar")
>
> .addClasses(RemoteDatabaseIntegrator.class,RemoteDatabaseIntegratorImpl.class);
> }
>
> @ArquillianResource
> private URL deploymentURL;
>
> private static final String JNDI_LOC = "RemoteDatabaseIntegratorRemote";
>
> @Test
> public void testDbServiceInjectionFailure() throws Exception{
> Properties p = new Properties();
> p.put("java.naming.factory.initial",
> "org.apache.openejb.client.RemoteInitialContextFactory");
> String providerUrl =
> String.format("http://%s:%s/tomee/ejb",deploymentURL.getHost(),deploymentURL.getPort());
> p.put("java.naming.provider.url", providerUrl);
> Context context = new InitialContext(p);
> RemoteDatabaseIntegrator dbIntegrator =
> (RemoteDatabaseIntegrator)context.lookup(JNDI_LOC);
> dbIntegrator.runQuery("select 1");
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)