Afaik you _could_, but it wouldn't be transactional (not a problem for
read-only operations I suppose), you expose yourself to more potential
exception sources (=higher risk your bean might mess up transactions it
partakes in unless the network the socket call is made over can be considered
reliable), and I guess there might be potential problems if the remote end
blocks for a long time or so... It shouldn't be too hard to put together a very
simple test environment to find out, though?
/Jonas
On Fri, 7 Jul 2000, yu_robin wrote:
> Hi canals,
> Yes, I want to make an ejb that acts as a client using sockets, I
> know that I can write client sockets in my ejbs but not server sockets, but
> the problem is that whether I can implement the ejb's ejbCreate(),
> ejbRemove(), ejbStore() and other methods through my client sockets sending
> data to and receiving data from a remote server socket, just as connecting
> to a database connection pool and make some sql operation.
>
> thanks.
>
>
> ++++++++++++++++++++++++++++
> Shanghai Huateng Software Systems Co., Ltd.
> 418 Gui Lin Road
> Shanghai, P.R.China 200233
> Tel : +86-21-6451-3533-11
> Fax : +86-21-6472-8625
> E-mail : [EMAIL PROTECTED]
> Web : http://www.huateng.com
> http://www.chinapay.com
>
> > ----------
> > From: Luis F. Canals[SMTP:[EMAIL PROTECTED]]
> > Reply To: A mailing list for Enterprise JavaBeans development
> > Sent: Friday, July 7, 2000 2:45 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Socket in Entity Bean
> >
> > Hello Robin,
> > If you want to listen (like a server) on a socket, you can't do it
> > whit
> > EJB (see Enterprise JavaBeans Specification, chap. 18, sec. 18.1.2. -you
> > can
> > download from http://java.sun.com/products/ejb/docs.html). If you want to
> > make an EJB that acts as a client using sokects (I think this is you're
> > trying, don't you?), the specification permits you.
> >
> > Regards.
> >
> > Luis F. Canals Samaniego
> > CEDETEL
> > Parque Tecnol��gico de Boecillo
> > Edificio Centro, Parcela 109
> > E-47151 Boecillo (Valladolid)
> > SPAIN
> >
> > Tfno: +34 983 54 65 02
> > Fax: +34 983 54 66 96
> >
> >
> > -----Mensaje original-----
> > De: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]En nombre de yu_robin
> > Enviado el: viernes 7 de julio de 2000 8:05
> > Para: [EMAIL PROTECTED]
> > Asunto: Socket in Entity Bean
> >
> >
> > Hi everyone,
> > I have some data that must be fetched from a remote host through socket,
> > and some others from a db. I want to hide the difference between these
> > two
> > ways of getting data upon the entity bean layer�� then session beans can
> > get
> > data through entity beans uniformly. Can I write socket in my bean managed
> > entity beans?
> > pls help me.
> > thanks.
> >
> > robin
> > ++++++++++++++++++++++++++++
> > Shanghai Huateng Software Systems Co., Ltd.
> > 418 Gui Lin Road
> > Shanghai, P.R.China 200233
> > Tel : +86-21-6451-3533-11
> > Fax : +86-21-6472-8625
> > E-mail : [EMAIL PROTECTED]
> > Web : http://www.huateng.com
> > http://www.chinapay.com
> >
> > ==========================================================================
> > =
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff EJB-INTEREST". For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
> > ==========================================================================
> > =
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff EJB-INTEREST". For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".