Skip to content

Commit

Permalink
AS7-6782 JAX-RS EJB integration does not generate component name corr…
Browse files Browse the repository at this point in the history
…ectly
  • Loading branch information
stuartwdouglas authored and kabir committed Mar 25, 2013
1 parent 7a398ac commit bf86bc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
final String jndiName;
if (component.getViews().size() == 1) {
//only 1 view, just use the simple JNDI name
jndiName = "java:app/" + moduleDescription.getModuleName() + "/" + componentClass.getSimpleName();
jndiName = "java:app/" + moduleDescription.getModuleName() + "/" + component.getComponentName();
} else {
boolean found = false;
String foundType = null;
Expand All @@ -104,7 +104,7 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
if (!found) {
throw JaxrsMessages.MESSAGES.typeNameNotAnEjbView(Arrays.asList(jaxrsType), component.getComponentName());
}
jndiName = "java:app/" + moduleDescription.getModuleName() + "/" + componentClass.getSimpleName() + "!" + foundType;
jndiName = "java:app/" + moduleDescription.getModuleName() + "/" + component.getComponentName() + "!" + foundType;
}

JAXRS_LOGGER.debugf("Found JAX-RS Managed Bean: %s local jndi jaxRsTypeName: %s", component.getComponentClassName(), jndiName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

@Path("ejbInterceptor")
@Produces({"text/plain"})
@Stateless
@Stateless(name = "CustomName")
@Interceptors(EjbInterceptor.class)
public class EJBResource implements EjbInterface {

Expand Down

0 comments on commit bf86bc8

Please sign in to comment.