bean class:
===========
@Stateless
@Interceptors({AssemblyInterceptor.class})
public class AssemblyBean extends AssemblyBeanBase
// implements AssemblyRemoteIF, AssemblyLocalIF
{
public AssemblyBean() {
}
}
bean superclass:
================
abstract public class AssemblyBeanBase
implements AssemblyRemoteIF, AssemblyLocalIF {
private int postConstructCalls;
public AssemblyBeanBase() {
}
protected void incrementPostConstructCalls() {
this.postConstructCalls++;
}
public int remoteAdd(int a, int b) {
return a + b;
}
public int getPostConstructCalls() {
return postConstructCalls;
}
}
bean interfaces:
================
@Local
public interface AssemblyLocalIF
// The two interfaces can't extend from AssemblyCommon, as that would
// introduce a third interface implemented by the bean class.
// extends AssemblyCommonIF
{
int getPostConstructCalls();
int remoteAdd(int a, int b);
}
@Remote
public interface AssemblyRemoteIF
// extends AssemblyCommonIF
{
int getPostConstructCalls();
int remoteAdd(int a, int b);
}
ejb-jar.xml:
===========
none
-- Cheng
On Wed, 1 Mar 2006, Kenneth Saks wrote:
> Cheng Fang wrote:
>
> >Hi,
> >
> >I have a ejb3 session bean indirectly implements a @Remote interface and a
> >@Local interface, and the two interfaces are the only interfaces for this
> >bean class.
> >
> Hi Cheng,
> Can you post an example of the way the bean class is defined?
>
> --ken
>
> >I'm expecting these two interfaces will be applied as the
> >bean's remote and local business interfaces, respectively. But somehow it
> >failed to deploy with errors like this:
> >
> >Caused by: java.lang.RuntimeException: Target ejb xxx for remote ejb 3.0
> >reference xxx does not expose a remote business interface of type <the
> >remote interface>
> >
> >Once I duplicate the implements clause in the bean directly, it deploys
> >fine, which leads me to think glassfish only gets the direct interfaces.
> >I looked at Class.getInterfaces() (whic I guess is used by glassfish), and
> >it seems only look at direct interfaces.
> >
> >Could someone confirm from the implementation side this is the case?
> >
> >I can give more details if necessary.
> >
> >Thanks.
> >-- Cheng
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> >For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
>