[jboss-jira] [JBoss JIRA] (AS7-6012) AS7 violating alternate client view of EJB 3.1 spec
Stuart Douglas (JIRA)
jira-events at lists.jboss.org
Thu Nov 22 17:48:21 EST 2012
[ https://issues.jboss.org/browse/AS7-6012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas resolved AS7-6012.
---------------------------------
Resolution: Rejected
This is only specified for the EE application client, where these views are available.
The EE spec has nothing to say about the JNDI locations that are available from a Java SE application, using our proprietary ejb-client API. Other than the EE application client and IIOP remote invocation is largely unspecified.
Attempting to make these java:global entries work from a standalone client is also impractical from a technical point of view, and falls over very quickly when you consider things like communicating with multiple servers, or attempting to invoke against an AS7 instance from another EE application server that already has its own java: namespace.
> AS7 violating alternate client view of EJB 3.1 spec
> ---------------------------------------------------
>
> Key: AS7-6012
> URL: https://issues.jboss.org/browse/AS7-6012
> Project: Application Server 7
> Issue Type: Bug
> Components: EJB
> Reporter: John Ament
> Assignee: jaikiran pai
>
> 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. AS7 is using a highly custom pattern for this view. This is shown when trying to run the following test case in Arquillian:
> @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);
> }
>
> private static final String JNDI_LOC = "?";
>
> @Test
> public void testDbServiceInjectionFailure() throws Exception{
> Context context = createAS7Context();
> RemoteDatabaseIntegrator dbIntegrator = (RemoteDatabaseIntegrator)context.lookup(JNDI_LOC);
> dbIntegrator.runQuery("select 1");
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list