[jboss-jira] [JBoss JIRA] (AS7-6012) AS7 violating alternate client view of EJB 3.1 spec

David Lloyd (JIRA) jira-events at lists.jboss.org
Tue May 7 21:17:53 EDT 2013


     [ https://issues.jboss.org/browse/AS7-6012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Lloyd resolved AS7-6012.
------------------------------

    Resolution: Rejected


This issue is not valid.  If you want to have JNDI names which match what you'd see on the server, you need to run your client JAR under the (Java EE compliant) application client environment.

The JNDI names we use in non-spec standalone client situations are not spec-violating because the spec does not govern this situation.
                
> 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