New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ejb multi server #562
Ejb multi server #562
Conversation
Hi Wolf, [Server:app-main] 12:07:14,742 INFO org.jboss.ejb.client.ClusterContext Added a new EJB receiver in cluster context ejb for node master:app-oneB. Total nodes in cluster context = 2 Once again, I stopped and started my server. It appears the apps deployed, but I'm seeing OutOfMemoryErrors: [Server:app-oneB] 12:10:48,594 INFO org.infinispan.remoting.transport.jgroups.JGroupsTransport ISPN000094: Received new cluster view: [master:app-oneB/ejb|1] [master:app-oneB/ejb, master:app-oneA/ejb] Do we need to modify the JAVA_OPTS? This is from my server start for 7.1.1: JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.domain.default.config=domain.xml -Djboss.host.default.config=host.xml I tried upping it to -Xms256 with no luck. |
I don't think that this will have any relation to the current PR. I've checked it with AS7.2.0 and EAP6.1 as the install script can be used for this without modifications. Nevertheless the shown errors, after I restart after install and deploy, add the users the test works fine with 7.1.1 on my system |
@@ -136,12 +139,23 @@ Access the Remote Client Application | |||
|
|||
mvn exec:java -DUseEjbClient34=true | |||
|
|||
The invocation of `appTwo` will not work since the secured method will be called and there is no Role for the user defined. Try to update the user `quickuser1` and `quickuser2` and give them one of the Roles `AppTwo` or `Intern`. After that the invocation will be successful. The log output of the `appTwo` servers shows which Role is applied to the user. The output of the client will show you a simple line with the information provided by the different applications: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to make the failure more obvious here. Maybe something like:
The invocation of `appTwo` throws a `java.lang.reflect.InvocationTargetException` since the secured method is called and there is no Role for the user defined. You get a `BUILD FAILURE` and the client outputs the following information:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project jboss-as-ejb-multi-server-client: An exception occured while executing the Java class. null: InvocationTargetException: JBAS014502: Invocation on method: public abstract java.lang.String org.jboss.as.quickstarts.ejb.multi.server.app.AppTwo.invokeSecured(java.lang.String) of bean: AppTwoBean is not allowed -> [Help 1]
Update the user `quickuser1` and `quickuser2` and give them one of the Roles `AppTwo` or `Intern`.
@wfink : This works great. I was able to get through all the testing, however, when I stop and start the server to make changes, for example, editing the user role properties to add the roles, my server always gets Other than that, if you can make the changes above, this one looks good to merge. |
@pmuir: Would you like someone to a code review? |
I didn't check this PR but the existing code on master (https://github.com/jboss-jdf/jboss-as-quickstart/tree/master/ejb-multi-server) contains a lot of violations by FileHeaderChecker, LicenseChecker, FinalNameChecker, PomElementOrderChecker, PropertiesNameChecker, SamePropertyValueChecker and mainly IndentationChecker It should be fine that we can fix this violations also before merging. Once more: I didn't check this PR. This info is based on the existing master |
Rafael, thanks for checking this. @wfink : Could you please run the QS Tools utility and fix any issues? Thanks! |
Looks ok to me. |
Sent an email to Wolf on Aug. 19 about the formatting and license errors in this one. |
@wfink: This still needs some README updates and some fixes to issues reported by the QSTools utility (license headers, formatting, etc.). |
@wfink: I made the README updates and merged. Daniel will fix the formatting and other QSTools errors. |
Add @ejb annotation and explanations to show how an EJB can be injected correctly.
Add comments and commands to be more clear how to run the examples