-
1. Re: Is it possible to invoke EJB3 over HTTP in JBoss AS7 Tesla ?
iansteigrad Jan 2, 2012 11:28 PM (in response to robertobeeman)Hi Roberto,
Did you ever get a response to this? I'm interested in the same question.
Ian
-
2. Re: Is it possible to invoke EJB3 over HTTP in JBoss AS7 Tesla ?
kavandesai Jan 3, 2012 12:03 AM (in response to iansteigrad)Hi Roberto,
I think its not yet supported.
Here is the issue for feature request.
-
3. Re: Is it possible to invoke EJB3 over HTTP in JBoss AS7 Tesla ?
iansteigrad Jan 3, 2012 12:15 AM (in response to kavandesai)Thanks Kavan,
This one is a pretty fundamental feature, it's difficult to get much into production without it given most firewall environments.
Will keep a lookout for 7.1Final.
Ian
-
4. Re: Is it possible to invoke EJB3 over HTTP in JBoss AS7 Tesla ?
jaikiran Jan 3, 2012 2:44 AM (in response to iansteigrad)1 of 1 people found this helpful -
5. Re: Is it possible to invoke EJB3 over HTTP in JBoss AS7 Tesla ?
robertobeeman Feb 23, 2012 1:01 PM (in response to jaikiran)Hi Jaikiran,
Thank you for providing the following great feature of remote lookup in simplified manner in JBoss AS7 thunder.
[code]
String JBOSS_CONTEXT=
"org.jboss.naming.remote.client.InitialContextFactory"
;;
Properties props =
new
Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT);
props.put(Context.PROVIDER_URL,
"remote://localhost:4447"
);
props.put(Context.SECURITY_PRINCIPAL,
"testuser"
);
props.put(Context.SECURITY_CREDENTIALS,
"testpassword"
);
context =
new
InitialContext(props);
[/code]
But in production environments it is sometimes not possible to open a port like 4447. Usually we prfer HTTP Ports only specially when we have an Apache WebServer running in front of JBoss Thunder .... So is there any plans for supporting EJB/JMS Access over Http protocol?
-
6. Re: Is it possible to invoke EJB3 over HTTP in JBoss AS7 Tesla ?
jbertram Feb 23, 2012 1:50 PM (in response to robertobeeman)1 of 1 people found this helpfulAs far as JMS is concerned the port 4447 is only used for JNDI lookups. The actual JMS work is done on other ports. JBoss AS7.1.Final (i.e. Thunder) uses HornetQ as its JMS implementation and HornetQ can be configured to use HTTP or a Servlet. See this bit of documentation for more on that.
Also, if you wish to avoid the use of 4447 altogether with JMS then you can eschew the JNDI look-up and use the HornetQ "core" API to acquire references to the required JMS artifacts. I believe something like this will work:
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.remoting.impl.netty.TransportConstants;
...
Destination destination = HornetQJMSClient.createQueue("testQueue"); //this is NOT the JNDI name, it is the HornetQ name
HashMap<String, Object> connectionParams = new HashMap<String, Object>();
connectionParams.put(TransportConstants.HOST_PROP_NAME, "localhost");
TransportConfiguration transportConfiguration = new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory", connectionParams);
ConnectionFactory connectionFactory = (ConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
After this you can use the Destination and ConnectionFactory just like you would if you looked them up in JNDI.
Unfortunately I can't weigh in on EJB.
-
7. Re: Is it possible to invoke EJB3 over HTTP in JBoss AS7 Tesla ?
robertobeeman Feb 23, 2012 1:56 PM (in response to jbertram)Wonderful Justin .... Justin++
My 50% problem is resolved by your answer on JMS part.