Hi David,
Thanks for your reply.
I think i might need the second option. Cause what my legacy server does is
a kind of RPC invokation. So I need to embed it into openejb so that it
could accept requests and map requests to specific session ejbs. 
If I understand correctly, i need to code up a container wrapper for it. Do
you happen to know where I could find some references in order to do such
things?

Thanks a lot,

Joe


David Blevins wrote:
> 
> 
> On Jun 10, 2008, at 8:50 PM, xianzheng wrote:
> 
>>
>> Hi all,
>> I'm new to J2EE and OpenEJB.
>> Just wondering, is there a way to embed an application server which is
>> written in JAVA in openejb? I guess, I'll have to write a container  
>> to wrap
>> it around? If so, is there a guide to write such thing? As my  
>> understanding,
>> JCA can only allows ejbs to connect to other servers rather than  
>> listening
>> connections?
>>
>> I have a very old server application i wrote, which complies a non- 
>> standard
>> communication protocol. So i'm thinking whether i could embed it into
>> openejb to listening to "old" request and benefit openejb's other cool
>> features.
> 
> Hi Joe,
> 
> Depending on what you want to do exactly there are likely many ways to  
> do it.
> 
> It is possible to plug in new protocols into a standard OpenEJB  
> install and support custom clients.  It's very easy to drop something  
> in that listens on a socket and does "stuff".  OpenEJB will find it on  
> startup and hook it up as it does the other protocols.  The "stuff" is  
> where all the detail lies.  Reflectively invoking proxies on the  
> server side by looking them up from the local global JNDI  
> (LocalInitialContextFactory) is easy, whereas sending invocations  
> directly into the EJB Containers like the EJBd protocol does is  
> harder.  Can show you how to do that if it sounds like a route you  
> might want to take.  (you basically implement a specific interface  
> then include a special properties file in your jar and drop it into  
> openejb, pretty easy)
> 
> If you have your own "component container" it is possible to add new  
> custom containers to a standard OpenEJB install.  This is a bit more  
> involved but not completely impossible.  The advantage here is that  
> any container can be invoked by any of the protocols plugged into  
> OpenEJB.
> 
> Sounds like you want more the first option where you can add a new  
> protocol.  There are definitely options.  Couple rounds of "mutual  
> data exchange" (aka discussion) and I'm sure we can find a good game  
> plan :)
> 
> -David
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-embed-a-server-into-openejb-standard-alone-server-tp17769556p17771513.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to