-
1. Re: EJB @Service Attribute/Property setting
bdecoste Jun 21, 2006 11:58 AM (in response to jlowcock)I think I understand your question - if I'm off base please let me know.
You can use the same Service class and deploy it twice with different service names two ways:
Use annotations to deploy the first and jboss.xml to deploy the second@Service(objectName = "default:service=development") ...
<service> <ejb-name>ServiceName</ejb-name> <ejb-class>com.acme.ServiceBean</ejb-class> <object-name>default:service=acceptance</objectname> ... <service>
OR you can use jboss.xml exclusively with no annotations:<service> <ejb-name>ServiceName</ejb-name> <ejb-class>com.acme.ServiceBean</ejb-class> <object-name>default:service=development</objectname> ... <service> <service> <ejb-name>ServiceName</ejb-name> <ejb-class>com.acme.ServiceBean</ejb-class> <object-name>default:service=acceptance</objectname> ... <service>
-
2. Re: EJB @Service Attribute/Property setting
jlowcock Jun 22, 2006 6:59 AM (in response to jlowcock)This is close, it shows how to deploy the same class as two separately identified services which is half the problem. The issue I'm facing is how do I access the details of ejb-name and service/cluster name within the Service code. I need this information to form the primary key of an EJB entity class to load configuration from the database.
I suppose that there is a way to access the information with the xml file, I'll go away and have a look at this as well.
I was looking for something along the lines of the env-entry within the deployment descriptor.