-
1. Re: Accessing remote ejbs from another jboss server instance
marcio.dantas Oct 25, 2010 12:53 PM (in response to marcio.dantas)If I find out something useful, I'll share here with you all.
best regards,
mpd -
2. Re: Accessing remote ejbs from another jboss server instance
cash1981 Oct 26, 2010 4:15 AM (in response to marcio.dantas)I don't know about jndi.properties, but remote access should work by creating a Webservice.
-
3. Re: Accessing remote ejbs from another jboss server instance
lvdberg Oct 26, 2010 6:23 AM (in response to marcio.dantas)Hi,
you an make a simple component which gets the object and provides it to the rest of the application. The Spring helper class is the same simple wrapper. Most Spring components can be used without a problem with Seam.
One of the big issues here is that you need to restart (or even re-compile) when you change the configuarion. Consider using JMX for configuration or make a
configuration-component
Leo
-
4. Re: Accessing remote ejbs from another jboss server instance
marcio.dantas Oct 28, 2010 12:39 PM (in response to marcio.dantas)Leo,
if I understood well, you're suggesting to use org.springframework.jndi.JndiObjectFactoryBean, right?
I was willing to find a pure seam solution, but I don't know if it exists.
It would be great if you could simply pass the jnp provider in componentes.xml.Shervin, I think plain remote ejbs (rcp/rmi) would be really best than webservices in my case.
thx -
5. Re: Accessing remote ejbs from another jboss server instance
lvdberg Oct 28, 2010 2:05 PM (in response to marcio.dantas)Hi,
the components.xml file can be used to create instances of any POJO, so Spring classes are no exception. The only problem is that Spring beans sometimes depend on its own functioanlity, so you must kickstart that. Dan Allen has written the excellent (free) SeamInAction chapter on this issue.
If you're just using the Spring bean, you can sublass it and add the hooks (basically the create and unwrap annotations, which in turn call the Spring methods).
Adding the Jndi.properties to the instance is just the way of injecting parameters. a component descriptor with only the bean-name and the attributes you want. Just as simple as it sounds.
Leo
P.S. As mentioned before have a look at JMX (Spring has great support for that) and use it to configure your properties. Things in components.xml do NOT need a re-compile, but it does need an rebuild and deploy!! With JMX you can do without these steps, so you basically get a
Hot-configurable
system (well, sort of) -
6. Re: Accessing remote ejbs from another jboss server instance
marcio.dantas Oct 28, 2010 9:23 PM (in response to marcio.dantas)thanks, leo! very good and insigthful post.
I already knew the spring way of doing this. I will now try using JMX.
Is there some good article or book that covers this example with JMX?
thx again -
7. Re: Accessing remote ejbs from another jboss server instance
lvdberg Oct 29, 2010 2:40 AM (in response to marcio.dantas)Hi,
Manning has some great Java books. There is also a JMX in Action book which provides you with all the information. Be aware that since Java 6 the creation of JMX-beans got a lot simpler for the regular beans (just annotations) so peek also in the JRE's provided functionality.
Leo