views:

196

answers:

1

I have an EJB Project with a @Singleton EJB defined as:

@LocalBean
@Singleton 
@Startup
public class DataModelBean implements DataModelBeanLocal {

I then have another EJB Project with another EJB:

@LocalBean
@Singleton
@Startup 
@EJB(beanInterface=DataModelBeanLocal.class,name="DataModelBeanLocal")
@DependsOn("DataModelBeanLocal")
public class OutboundRouting implements OutboundRoutingLocal {

However the @DependsOn is not working, I have tried a number of different values for the @DependsOn with no success. The server failes to start with:

  Deployment Error for module: Atlas: Exception while deploying the app : java.lang.RuntimeException: Invalid DependsOn dependency 'DataModelBeanLocal' for EJB OutboundRouting%%%EOL%%%

I am not sure what I should be doing here, any suggestions?

Cheers,

James

A: 

Try this instead:

@Singleton
@DependsOn("DataModelBean")
public class OutboundRouting { ... }
Pascal Thivent
I had tried that and it still did not work.
James
@James what error do you get (because this is how you are supposed to use it)
Pascal Thivent
From eclipse I get a publishing has encountered a problem: cannot deploy Atlas Deployment Error for module: Atlas: Exception while deploying the app : java.lang.RuntimeException: Invalid DependsOn dependency 'DataModelBean' for EJB OutboundRouting%%%EOL%%%
James
Again not an issue when I deploy manually. Will raise another issue.
James