Hi,
I'm trying to achieve the following:
I'd like to have each bean of the Duke's Store Java EE Tutorial application as a seperate Remote Bean, which is clustered. This way I could have a server which has the AdministratorBean, UserBean and GroupsBean, while another server cluster of 3 JBoss AS servers could have the OrderBean, OrderStatusBean and OrderDetailBean.
How I'm currently creating the project:
I have extracted interfaces of all beans. These interfaces were put in a seperate project, which resulted in BeansInterfaces.jar.
Every bean is then placed in a seperate Netbeans EJB project, which produces a .jar for each EJB.
I then created a seperate application project for each bean, to have each ejb jar packaged in an ear. Each EAR contains the BeansInterfaces.jar.
Every bean is annotated with @Remote, and every EJB is injected with, for example:
Person user; | |
@EJB(lookup = "java:global/UserBeanApp/UserBean/UserBean") |
You can see the structure visualised in the attachment.
Now my question is: Is this possible? (I'm currently investigating if it would be beneficial to dynamically scale on a bean level instead of a application or module level for my thesis. I know the actual setup wouldn't be very interesting in real life)
My current problem is the same as https://community.jboss.org/message/797833 :
My injected bean isn't compatible. The solution should be to only have every jar only once. But because it should be possible to have every bean running on a seperate server, I should include the BeanInterfaces.jar in each EAR. Is there another solution?