• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing Applets and J2EE/EJB

 
Rambo Rambabu
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I need to work on a project in which I need to use Swing applets, j2ee/ejb and application server tech. I am new to swing and don't have any idea how to communicate with appserver using swing applets. i have a vague idea that i may be able to do this by calling servlets from swing enent listeners. is that effecient? what would be the most efficient way to do this?
thank you.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ramborambabu" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Thanks! and welcome to the JavaRanch!
 
Rambo Rambabu
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for pointing out Nate. I corrected it.
-- Rambo
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!

Hmmmm.... not knowing much about the desingn of your project, it would be difficult to give you advice...

Usually the way that I have heard of interacting with EJB's this way is to have your data and business logic encapsulated in your EJB's, use servlets to provide a thin web presentation layer, and/or use a Swing application to provide a thick GUI presentation layer.

According to this plan you would probably access your EJB's directly from your Swing applet, though, since I'm not aware of any design considerations, that may not be what you need to do...

Is the project an upgrade of a previous servlet project that had business logic embedded in the servlet layer? You may have to call servlets in your Swing applet like you were saying, or re-design your servlet-EJB interaction...
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hm, I just designed the gui for a web application which used EJBs as backend. but actually my gui didn't know anything about the EJBs. I just had some Manager (or Controller) classes that would delegate GUI requests to the backend. I think thats a fine idea. this way you can change either the frontend or the backend without having to change the other one. you would just have to write an adapter.
cheers
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!