-
1. Incorrect Redeployment of ejb/service module in JBoss 6
jaikiran Mar 4, 2011 3:10 AM (in response to fambad)How do you redeploy the application? And how do you ensure that the new .class file is indeed available in the redeployed app? And how is your application packaged (.ear, .war or .jar)?
-
2. Incorrect Redeployment of ejb/service module in JBoss 6
fambad Mar 4, 2011 3:14 AM (in response to jaikiran)I deployed is as jar-file. After redeploying the jar I opened the jar file and decompile the service class. And so I saw that the new code is within the class.
I deploy the jar using my own specified deployment directory of jboss (JBOSS_HOME/server/default/my-deploy).
-
3. Incorrect Redeployment of ejb/service module in JBoss 6
jaikiran Mar 4, 2011 3:23 AM (in response to fambad)Marco Strauch wrote:
I deploy the jar using my own specified deployment directory of jboss (JBOSS_HOME/server/default/my-deploy).
I am not sure hot deployment is enabled by default to custom deploy folders like the one you have. How did you setup the server to use my-deploy as a deploy location?
-
4. Incorrect Redeployment of ejb/service module in JBoss 6
fambad Mar 4, 2011 3:40 AM (in response to jaikiran)I setup the deploy folder using the profile.xml in bootstrap folder:
<bean name="UserProfileFactory"
class="org.jboss.system.server.profileservice.bootstrap.StaticBootstrapProfileFactory">
<property name="confURI">${jboss.server.config.url}</property>
<property name="deployersURI">${jboss.server.home.url}deployers</property>
<property name="applicationURIs">
<list elementClass="java.net.URI">
<value>${jboss.server.home.url}deploy</value>
<value>${jboss.server.home.url}my-deploy</value>
</list>
</property>
<property name="attachmentStoreRoot">${jboss.server.data.dir}/attachments</property>
</bean>
At the same time I tested a little bit more. And no I must admit that it was my error. Because I tested some use case I deployed some classes in a previous sample in the lib dir. Because that the service class was also available in the lib folder and so this class were used and not the class in the deploy folder.
Sorry for that. I don't recognized this.
-
5. Incorrect Redeployment of ejb/service module in JBoss 6
jaikiran Mar 4, 2011 3:42 AM (in response to fambad)Marco Strauch wrote:
Yes, that would explain this behaviour.
Marco Strauch wrote:
Sorry for that. I don't recognized this.
No problem!
-
6. Incorrect Redeployment of ejb/service module in JBoss 6
fambad Mar 4, 2011 3:46 AM (in response to fambad)Maybe I can ask another question here.
When I have two ejb modules as jars deployed and want to reference a stateless session bean using the @EJB annotation that is situated in the other jar I have to set the mappedName of the @EJB annotation. Why have I to set this. In JBoss 4.2.x I don't have to set this mappedName property.
Sample:
ejb-module-1.jar
@Stateless
public class TestSessionBean1 {
// methods
}
ejb-module-2.jar
@Stateless
public class TestSessionBean2 {
@EJB
private TestSessionBean1 test; // will not work
@EJB( mappedName = "TestSessionBean1/no-interface" )
private TestSessionBean1 test; // will work
}
-
7. Incorrect Redeployment of ejb/service module in JBoss 6
jaikiran Mar 4, 2011 4:06 AM (in response to fambad)Injection across separate deployments (like the one you have) isn't supported https://issues.jboss.org/browse/JBAS-6332
You can however package both those jars in a single .ear (if you application allows you to do that) and then you can just inject using @EJB without the mappedName.
-
8. Incorrect Redeployment of ejb/service module in JBoss 6
fambad Mar 4, 2011 4:21 AM (in response to jaikiran)OK. Thanks for the quick answers.
In our case we want to deploy several modules outside one big ear to be more flexibel. So we will set the mappedName.
Will this issue be resolved in future or will this stay unsupported?
-
9. Incorrect Redeployment of ejb/service module in JBoss 6
jaikiran Mar 4, 2011 4:33 AM (in response to fambad)Marco Strauch wrote:
Will this issue be resolved in future or will this stay unsupported?
No one has yet taken it up and it's not marked for any release yet. But if there's enough interest in this one then it might get fixed in AS7 (which is currently under development).