-
1. Re: Local interfaces and web applications
adrian.brock Aug 6, 2002 6:14 AM (in response to yyop)Yes you can do this.
You will have to lookup the local interface in jndi.
It is bound by default at local/<your-ejb-name>
The only method currently to make a dependency between
the two is to put them in an ear.
If you deploy individually and change the ejb jar
you will get ClassCastExceptions if you don't restart
the web app.
Regards,
Adrian -
2. Re: Local interfaces and web applications
yyop Aug 6, 2002 6:50 AM (in response to yyop)Hello,
Thanks for your response. It's already running, without problems (at least, at first sight).
Another question, although some posts says that Facade pattern is useless with local interfaces I think that its better to maintain a session layer between the servlets and the entities. I think that I can use the Data Transfer Object pattern to send data from servlet to entity (through a session bean) and use the local objects to display data at JSP's / Servlets (without the DTO's).
Is the previous architecture logical? or, am I losing the advantages of the local interfaces (by using a facade pattern)?
Again, thanks in advance,
Bye -
3. Re: Local interfaces and web applications
adrian.brock Aug 6, 2002 7:52 AM (in response to yyop)The facade pattern is fine.
In general you should split your app into three layers
although this might be overkill for small apps.
presentation (servlet/jsp/other)
business logic (SLSB facade)
persistence (entities with caching, locking, etc.)
The other advantage of the facade is to combine
multiple entity accesses into one transaction.
Regards,
Adrian