-
1. Re: jboss to non-j2ee connection
juha Oct 20, 2003 4:45 AM (in response to bigbinc)What exactly do you want to do? Have a servlet call an EJB?
-- Juha -
2. Re: jboss to non-j2ee connection
bigbinc Oct 21, 2003 7:24 AM (in response to bigbinc)Yea, but the servlet is written without jboss/possibly w/o tomcat. non-j2ee.
Or possibly a socket connection. But I dont think ejbs do sockets.
I read somewhere I could just use the http protocol to communicate but are there other ways? -
3. Re: jboss to non-j2ee connection
juha Oct 21, 2003 7:27 AM (in response to bigbinc)Yes you can use HTTP, but what's wrong with using just the default RMI?
-- Juha -
4. Re: jboss to non-j2ee connection
bigbinc Oct 21, 2003 12:52 PM (in response to bigbinc)Hmm, dont know RMI that well. I have a lot of network code in sockets/servlet(mainly use HTTP get and post).
Will RMI work well when communicating from j2ee/jboss to j2se/RMI?. -
5. Re: jboss to non-j2ee connection
juha Oct 21, 2003 2:17 PM (in response to bigbinc)All you need to do is lookup the proxy from the JBoss naming service inside your servlet code. The default proxies already use RMI. Lookup the home proxy and use create() to get a remote proxy, and then use it.
This is standard EJB programming, the same way you'd do it from a standalone client.
-- Juha -
6. Re: jboss to non-j2ee connection
bigbinc Oct 21, 2003 3:31 PM (in response to bigbinc)Maybe I am not understanding. Normally I think of EJB/JBOSS on one server machine and all code is compiled on that machine. I run ANT on this machine the code gets deployed you are off to the races. My bean is deployed on JBOSS, good. Lets say, I want to write a client, but I have to travel far,far,far away to Iraq, the Iraq machine only has j2se, you are telling me I can write a simple client and compile it without any code from the jboss server. And I cant install anything on the Iraq machine. The only connection is knowing the naming of the ejb.
I know that is typical client/server but most everything I work with on jboss, I compile/deploy the client and server code on the same machine. -
7. Re: jboss to non-j2ee connection
bigbinc Oct 21, 2003 3:36 PM (in response to bigbinc)Could you show me a simple(5-10) lines of a j2se client. Or just show me what import libraries I would typically use. I was trying to code one out real fast.
import javax.naming.*;
public class testIt {
public static void main(String [] args) {
try {
Context lContext = new InitialContext();
System.out.println("Hello");
} catch(
} // end of the function main
} // end of the class -
8. Re: jboss to non-j2ee connection
juha Oct 21, 2003 4:55 PM (in response to bigbinc)
If you're connecting to an EJB through a servlet all your client needs is a web browser. The sevlet is the client to the EJB.
You can compile EJB clients using just standard J2EE interfaces, however at runtime you need app server specific libs (as J2EE only provides the interfaces, not implementation)
-- Juha -
9. Re: jboss to non-j2ee connection
bigbinc Oct 21, 2003 5:05 PM (in response to bigbinc)Ok, lets say I dont have a web-browser, how would I talk to the ejb. The client is on another machine.
-
10. Re: jboss to non-j2ee connection
bigbinc Oct 21, 2003 5:07 PM (in response to bigbinc)I have read that I should use the Corba objects.
-
11. Re: jboss to non-j2ee connection
juha Oct 21, 2003 5:14 PM (in response to bigbinc)> Ok, lets say I dont have a web-browser, how would I
> talk to the ejb. The client is on another machine.
This is covered by a multitude of EJB documentation. Check it out. They all work on standard J2EE APIs.
-- Juha -
12. Re: jboss to non-j2ee connection
juha Oct 21, 2003 5:15 PM (in response to bigbinc)> I have read that I should use the Corba objects.
Using CORBA forces you to compile stubs that you need to distribute to all your clients.
-- Juha -
13. Re: jboss to non-j2ee connection
bigbinc Oct 21, 2003 5:30 PM (in response to bigbinc)This kind of what I am looking for.
http://jproxy.com -
14. Re: jboss to non-j2ee connection
juha Oct 21, 2003 5:38 PM (in response to bigbinc)As said earlier, we do have HTTP proxies. It doesn't change how you code your EJB clients though.
-- Juha