01: package com.flexive.example.shared.interfaces;
02:
03: import com.flexive.shared.exceptions.FxApplicationException;
04: import com.flexive.shared.structure.FxType;
05:
06: import javax.ejb.Remote;
07: import java.util.Map;
08:
09: /**
10: * <p>A demo interface for an EJB bean.</p>
11: * <p>
12: * This EJB engine provides a method that returns the instance counts by type for the
13: * current installation.
14: * </p>
15: * <p>
16: * The common interface should always be marked as a Remote interface, since this is more
17: * portable across application servers for classes that are not using EJB dependency injection.
18: * </p>
19: * <p>
20: * The easiest way to do this is to extend the remote interface and tag it with the @Local annotation.
21: * Flexive's {@link com.flexive.shared.EJBLookup EJBLookup} automatically uses the local interface
22: * if it's available.
23: * </p>
24: */
25: @Remote
26: public interface EJBExample {
27:
28: /**
29: * Return the instance counts for all registered {@link FxType FxTypes}.
30: *
31: * @return the instance counts for all registered {@link FxType FxTypes}.
32: * @throws com.flexive.shared.exceptions.FxApplicationException
33: * if the instance counts could not be determined
34: */
35: Map<FxType, Integer> getInstanceCounts()
36: throws FxApplicationException;
37: }
|