Re: How to change the Database for ActiveMQ with local Ressource?
On Oct 24, 2008, at 7:31 AM, Jochen Zink wrote: Hello, is it possible to change the Database, where ActiveMQ stores the JMS- Messages? I have an EAR with the activemq ra inside. The RA is reference in the appliation.xml. The JMS-Ressource (Queue and Factory) are configured inside the geronimo-application.xml. Is it in this case possible to store the messages inside an external Database? Where is the broker the connections connect to? Which rar is it? our trimmed one or the activemq all-in-one rar? Which amq version? thanks david jencks Thanks a lot! Regards Jochen __ "Run, Fatboy, Run" sowie "Rails & Ties" kostenlos anschauen! Blockbuster-Gutscheine sichern unter http://www.blockbuster.web.de
How to change the Database for ActiveMQ with local Ressource?
Hello, is it possible to change the Database, where ActiveMQ stores the JMS-Messages? I have an EAR with the activemq ra inside. The RA is reference in the appliation.xml. The JMS-Ressource (Queue and Factory) are configured inside the geronimo-application.xml. Is it in this case possible to store the messages inside an external Database? Thanks a lot! Regards Jochen __ "Run, Fatboy, Run" sowie "Rails & Ties" kostenlos anschauen! Blockbuster-Gutscheine sichern unter http://www.blockbuster.web.de
Re: Spring Security & securing EJBs in Geronimo
On Oct 24, 2008, at 3:11 PM, jayess wrote: Hi. I'm doing a little investigation to see if we can use Spring Security for the web tier and still have have the EJBs secured by the container (as I understand Spring Security can't be used for EJBs - am I wrong?). The customer wants to use Spring Security. And this is just investigative work to find possible approaches. End result is that I want to be able to secure the EJBs using annotations. I have a EAR file deployed to Geronimo (Jetty). In the EAR, I have a simple WAR file that is secured by Spring Security (i.e. all web resources are protected properly). I've enabled authentication/authorization at this level and it works fine. For the EJBs, I've added @RolesAllowed annotations to my EJBs and I've enabled EJB security by adding an empty tag in the geronimo-application.xml. Now my EJBS are secure (I get a "Unauthorized Access by Principal Denied" when I try to access them). Now I need to tie the two securities together. I am thinking that I could create a servlet filter that "hooks into" geronimo security as follows: : Subject subject = new Subject(); subject.getPrincipals().add(...); ContextManager.setCurrentCallers(subject,subject) That's close to what should work First, if you can get the principals I imagine you can get the Subject out of Spring security and use it rather than constructing another one. Next, for geronimo's JACC Implementation to work you have to register the Subject so we can pre-compute the AccessControlContext for the subject. Finally, the ContextManager.setCurrentCallers(subject,subject) is correct. So I think something like this ought to work: Subject subject = extractSubjectFromTheDeathGripOfSpring(); ContextManager.registerSubject(subject); ContextManager.setCurrentCallers(subject,subject); If Spring successfully hides the subject but lets you see the principals then constructing a Subject as you do above ought to work too. Hope this helps david jencks : However I am having problems. When I try to access a secured EJB (after authentication in Spring), I get the following error: java.lang.NullPointerException at org .apache .geronimo .security.ContextManager.getCurrentContext(ContextManager.java:164) at org .apache .geronimo .openejb .GeronimoSecurityService .isCallerAuthorized(GeronimoSecurityService.java:101) at org .apache .openejb .core.stateless.StatelessContainer.invoke(StatelessContainer.java:142) at org .apache .openejb .core .ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java: 217) at org .apache .openejb .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77) at org .apache .openejb .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321) at org .apache .openejb .util .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49) So my questions: 1. Is there a way to hook into Geronimo security? If so how do I create the Subject properly so that Geronimo can use it? 2. Given that we want to use "Spring Security" for the web tier, but want our EJBs secured ... is there a better approach? I'm new to security in general and any advice would be greatly welcomed. Also, to reiterate, we have not decided to use Spring Security but need to investigate if it's even doable - given the fact we are deploying to Geronimo and do want our EJBs secured by annotations. Thanks so much -- View this message in context: http://www.nabble.com/Spring-Security---securing-EJBs-in-Geronimo-tp20158641s134p20158641.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Spring Security & securing EJBs in Geronimo
Hi. I'm doing a little investigation to see if we can use Spring Security for the web tier and still have have the EJBs secured by the container (as I understand Spring Security can't be used for EJBs - am I wrong?). The customer wants to use Spring Security. And this is just investigative work to find possible approaches. End result is that I want to be able to secure the EJBs using annotations. I have a EAR file deployed to Geronimo (Jetty). In the EAR, I have a simple WAR file that is secured by Spring Security (i.e. all web resources are protected properly). I've enabled authentication/authorization at this level and it works fine. For the EJBs, I've added @RolesAllowed annotations to my EJBs and I've enabled EJB security by adding an empty tag in the geronimo-application.xml. Now my EJBS are secure (I get a "Unauthorized Access by Principal Denied" when I try to access them). Now I need to tie the two securities together. I am thinking that I could create a servlet filter that "hooks into" geronimo security as follows: : Subject subject = new Subject(); subject.getPrincipals().add(...); ContextManager.setCurrentCallers(subject,subject) : However I am having problems. When I try to access a secured EJB (after authentication in Spring), I get the following error: java.lang.NullPointerException at org.apache.geronimo.security.ContextManager.getCurrentContext(ContextManager.java:164) at org.apache.geronimo.openejb.GeronimoSecurityService.isCallerAuthorized(GeronimoSecurityService.java:101) at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:142) at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217) at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77) at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321) at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49) So my questions: 1. Is there a way to hook into Geronimo security? If so how do I create the Subject properly so that Geronimo can use it? 2. Given that we want to use "Spring Security" for the web tier, but want our EJBs secured ... is there a better approach? I'm new to security in general and any advice would be greatly welcomed. Also, to reiterate, we have not decided to use Spring Security but need to investigate if it's even doable - given the fact we are deploying to Geronimo and do want our EJBs secured by annotations. Thanks so much -- View this message in context: http://www.nabble.com/Spring-Security---securing-EJBs-in-Geronimo-tp20158641s134p20158641.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Geronimo and Grails
On Oct 24, 2008, at 11:13 AM, Joe Bohn wrote: I've been playing around with grails and I encountered this exact same behavior Michael mentioned. Even with Gianny's recommended hidden classes I received the dom4j InvalidXPathException on the Tomcat Javaee5 assembly. I was able to get a grails app working on a tomcat javaee5 assembly by adding just one more filter for the jaxen classes. So, my geroniom-web.xml looks like this: http://geronimo.apache.org/xml/ns/j2ee/web-1.2";> http://geronimo.apache.org/xml/ns/deployment-1.2 "> yourGroupId yourArtifactId yourVersion war org.jaxen org.springframework org.apache.cxf org.apache.commons /yourContextPath/ BTW, it is true that you can deploy a grails app into either minimal assembly without any hidden-class filters in the deployment plan. The additional libraries in the javaee5 assemblies make the filters necessary. Apparently there are some classloader differences between the Jetty and Tomcat assemblies that make the jaxen addition necessary when deploying to a Tomcat Javaee5 server. It would be nice to figure out what the differences are. My first guess would be myfaces, my second some web services bit. I think that a ModuleBuilderExtension must be adding more dependencies for no good reason. It would be even better to fix this. thanks david jencks Joe michaelg wrote: I am writing an article for IBM developerWorks on using Grails and Geronimo together. However, I am unable to deploy a Grails WAR to Geronimo. I first tried it with Geronimo 2.1.1 with Jetty. The error I got was a NoClassDefFound for org.apache.commons.fileupload.FileItemFactory. This class is the Geronimo repository, and is also included with the Grails war. It's the same version for both. Next I tried it with Geronimo 2.1.1 with Tomcat. This time I got a dom4j InvalidXPathException. Next I tried the Little G distribution. It worked perfectly. I had also tried standalone Tomcat with success as well, so I guess this should not have been too surprising. Obviously I have to point a finger at Grails or Geronimo, and since it works fine on Tomcat or Little G, I am pointing the finger at Geronimo. The Geronimo/Jetty error sure smelled like a class loader problem, but I have no clue on the Geronimo/Tomcat. Note, in all cases I included a Geronimo deployment plan inside the WAR (/WEB-INF/geronimo-web.xml) Any ideas/advice is greatly appreciated.
Re: Geronimo and Grails
I've been playing around with grails and I encountered this exact same behavior Michael mentioned. Even with Gianny's recommended hidden classes I received the dom4j InvalidXPathException on the Tomcat Javaee5 assembly. I was able to get a grails app working on a tomcat javaee5 assembly by adding just one more filter for the jaxen classes. So, my geroniom-web.xml looks like this: http://geronimo.apache.org/xml/ns/j2ee/web-1.2";> http://geronimo.apache.org/xml/ns/deployment-1.2";> yourGroupId yourArtifactId yourVersion war org.jaxen org.springframework org.apache.cxf org.apache.commons /yourContextPath/ BTW, it is true that you can deploy a grails app into either minimal assembly without any hidden-class filters in the deployment plan. The additional libraries in the javaee5 assemblies make the filters necessary. Apparently there are some classloader differences between the Jetty and Tomcat assemblies that make the jaxen addition necessary when deploying to a Tomcat Javaee5 server. Joe michaelg wrote: I am writing an article for IBM developerWorks on using Grails and Geronimo together. However, I am unable to deploy a Grails WAR to Geronimo. I first tried it with Geronimo 2.1.1 with Jetty. The error I got was a NoClassDefFound for org.apache.commons.fileupload.FileItemFactory. This class is the Geronimo repository, and is also included with the Grails war. It's the same version for both. Next I tried it with Geronimo 2.1.1 with Tomcat. This time I got a dom4j InvalidXPathException. Next I tried the Little G distribution. It worked perfectly. I had also tried standalone Tomcat with success as well, so I guess this should not have been too surprising. Obviously I have to point a finger at Grails or Geronimo, and since it works fine on Tomcat or Little G, I am pointing the finger at Geronimo. The Geronimo/Jetty error sure smelled like a class loader problem, but I have no clue on the Geronimo/Tomcat. Note, in all cases I included a Geronimo deployment plan inside the WAR (/WEB-INF/geronimo-web.xml) Any ideas/advice is greatly appreciated.
Re: Accessing corba from geronimo [SOLVED]
Hello, I poked around a bit more after Rick and Juergen's followups, and looked in the yoko source, especially the InitialServiceManager, to see what it did. Now, I have returned to my original code, but with a subtle difference, I replaced the property: org.omg.CORBA.ORBInitRef.NameService with yoko.orb.service.NameService My code now looks like this: Properties properties = new Properties(); properties.put("yoko.orb.service.NameService", "corbaloc::10.11.12.13:4003/NameService"); orb = ORB.init(new String[0], properties); org.omg.CORBA.Object ns = orb.resolve_initial_references("NameService"); NamingContextExt namingContext = NamingContextExtHelper.narrow(ns); org.omg.CORBA.Object obj = namingContext.resolve_str( "org/example/FooService"); communicator = CommunicationHelper.narrow(obj); // use the communicator here... That works in Geronimo, and it sure is a lot more manageable than the raw IOR lookup string, so I'm happy again. Btw, the yoko documentation mentions the yoko.orb.service.* property in passing here: http://cwiki.apache.org/YOKO/orb-properties.html -- Fredrik Jonson
Re: Spring framework
On Oct 24, 2008, at 8:13 AM, Ashwill, Steve (Facilities & Services) wrote: Any plans to upgrade the Spring Framework to the latest version? We are trying to run the latest version of Mule from mulesource as an application in the Geronimo container but there are conflicts with the Spring Framework versions. Mule is currently running Spring Framework 2.5. You could considerably speed the upgrade if you would try building geronimo with the upgraded spring version and see if there are any obvious problems and if the old spring copy is pulled in by a dependency we haven't excluded. The spring version is in the root pom as a property. Assuming the build succeeds, check the geronimo repo to make sure only the specified spring version is included. Please open a jira with the upgrade request and your results. Many thanks david jencks Thanks, Steven Ashwill
Spring framework
Any plans to upgrade the Spring Framework to the latest version? We are trying to run the latest version of Mule from mulesource as an application in the Geronimo container but there are conflicts with the Spring Framework versions. Mule is currently running Spring Framework 2.5. Thanks, Steven Ashwill
Re: Distribution of module failed, Module was not an EJB: SampleEJB.jar
Hi Tim, Thanks a lot. I added those two annotations and it worked out well. Its a stupid mistake but when I created interface and ejb class, I thought it would be automatically generated. Thanks Again. Tim McConnell wrote: > > Hi tagma, thanks for providing your workspace. Now I can immediately see > the > problem. I'm curious though why you omitted the @Stateless and the @Remote > annotations in the EJB MyStatelessSessionBean and the > RemoteBusinessInterface > java classes ?? If you add them exactly as specified in the tutorial it > will > deploy and execute perfectly. I made those exact changes to the workspace > you > sent and it now works correctly. Can you give this a try and see what > happens ?? > So here is what your EJB classes should look like: > > -> MyStatelessSessionBean.java: > > package sampleear; > > import javax.ejb.Stateless; > > @Stateless > public class MyStatelessSessionBean implements RemoteBusinessInterface { > > public String sayHello(String name) { > return getClass().getName() + " says hello to " + name + "."; > } > } > > > -> RemoteBusinessInterface.java: > > package sampleear; > > import javax.ejb.Remote; > > @Remote > public interface RemoteBusinessInterface { > public String sayHello(String name); > } > > Let me know what happens please. Thanks again. > > > tagma wrote: >> Hello Tim, >> >> I removed my whole project and tried it again but got the same exception. >> please find the below workspace attachment . >> >> Thanks Again >> Tagma >> >> >> Tim McConnell wrote: >>> Hi tagma, Nothing obvious is jumping out at me. I just went through the >>> tutorial >>> myself and it worked great for me. Could you export your tutorial >>> workspace and >>> either email it to me or attach it to this thread (it should be a very >>> small >>> zipfile) ?? That way I can see better what is causing your problem. >>> Thanks >>> much >>> >>> tagma wrote: Hi, I installed J2SE5, Eclipse EE 3.4,Geronimo 2.1.3 and geronimo eclipse plug-in 2.1.3. I followed this 5 minute tutorial exactly. http://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html When I am trying to start the server ,getting below exception. Can someone help me out. Distribution of module failed. See log for details. Module was not an EJB: SampleEJB.jar org.apache.geronimo.common.DeploymentException: Module was not an EJB: SampleEJB.jar at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules(EARConfigBuilder.java:796) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfigBuilder.java:402) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:295) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:226) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.mana
Re: Problem adding jar to daytrader
On Wed, Oct 22, 2008 at 5:32 PM, David Jencks <[EMAIL PROTECTED]>wrote: > > I don't recall the exact state of daytrader. If you are building > daytrader as a geronimo plugin and installing it as a plugin then the jar > dependencies will automatically be installed into geronimo when you install > the daytrader plugin. If you are installing daytrader by deploying it > directly in geronimo as a javaee application then the dependencies will not > get to geronimo automatically. In this case you can either install the > dependencies yourself by copying them or using the admin console or you > could include them in the ear under the lib/ directory. > > Hi. It seems the jar wasn't being included (we were mistakenly using provided), and then we needed to add them to the at the end of pom.xml. It's working now, thanks. Hugo Rito