[jboss-user] [EJB 3.0] - Re: Service Beans in Embeddable EJB 3.0?
jazir1979
do-not-reply at jboss.com
Wed Jan 3 23:04:30 EST 2007
Hi there,
If your EJBs are being started you will see it in your logs, something similar to what I've got here:
| DEBUG 03-01 15:00:33,895 (Ejb3AnnotationHandler.java:getContainers:158) -found EJB3: ejbName=LookupActionBean, class=LookupActionBean, type=STATELESS
| DEBUG 03-01 15:00:33,906 (ProxyDeployer.java:initializeRemoteBindingMetadata:131) -no declared remote bindings for : LookupActionBean
| DEBUG 03-01 15:00:33,925 (Ejb3DescriptorHandler.java:addClassAnnotation:1686) -adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to LookupServiceBean org.jboss.annotation.internal.DefaultInterceptorMarkerImpl at 2d95b3
| DEBUG 03-01 15:00:33,926 (Ejb3DescriptorHandler.java:addClassAnnotation:1688) -adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to LookupServiceBean org.jboss.annotation.internal.DefaultInterceptorMarkerImpl at 2d95b3
| DEBUG 03-01 15:00:33,928 (Ejb3DescriptorHandler.java:addClassAnnotation:1686) -adding class annotation javax.annotation.security.DeclareRoles to LookupServiceBean org.jboss.ejb.DeclareRolesImpl at bf5555
| DEBUG 03-01 15:00:33,928 (Ejb3DescriptorHandler.java:addClassAnnotation:1688) -adding class annotation javax.annotation.security.DeclareRoles to LookupServiceBean org.jboss.ejb.DeclareRolesImpl at bf5555
|
When I have the above bean, I can look it up from a unit test as:
| bean = (LookupAction) ctx.lookup("LookupActionBean/local");
|
Check that your unit tests run with the following jndi.properties in the classpath, or specified when you get your initial context:
| java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997815#3997815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997815
More information about the jboss-user
mailing list