You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kent Larsson <ke...@gmail.com> on 2008/11/15 09:44:35 UTC

Do you have any tips regarding smart models in a Java EE (with SLSB manager classes), Wicket, Hibernate application?

Hi,

I have this 3-tier architecture in mind:

1. Persistence: Hibernate in its pure form (i.e. not using it as a JPA
persistence provider.)
2. Business: Manager classes annotated as Stateless Session Beans (SLSB's).
3. Presentation: Wicket

I thought I'd use Java Transaction API (JTA) using annotations on my
SLSB methods. In other words, container managed persistence using EJB
annotations. The persistence entities would more or less be pure
structures without any logic, as the logic would reside in the
business tier.

>From the presentation tier, using Wicket, I'm wondering if any of you
has any kind if smart model for this kind of architecture? I was
thinking of if there is any good way to populate the model, see if
things has changed (changed entity or deleted entity during user
editing for example) so I may display warnings/errors, submit
completed entity changes to the manager SLSB and such.

I'm tempted at changing Java EE for Spring. But I need a site with
high availability and scalability, which means a clustered solution
with replication, load-balancing and fail-over. And I have no
experience with Spring, I'm sure it's possible, but it might take a
longer time for me if I'd use it.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Do you have any tips regarding smart models in a Java EE (with SLSB manager classes), Wicket, Hibernate application?

Posted by jWeekend <jw...@cabouge.com>.
Kent,

You may find  http://in.relation.to/Bloggers/SeamlessWicket JBoss Seam's
Wicket integration  interesting if you're looking to use Wicket with JEE.
There's a 
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-javaee
Wicket-JEE integration project  too on 
http://wicketstuff.org/confluence/display/STUFFWEB/Home WicketStuff .

If you prefer to use Spring you may choose to create a service-layer (where
Spring managed transactions could be demarcated) to replace your SLSBs
functionality. Spring is very well tried and tested with Wicket applications
and the Wicket developers have made the 
http://cwiki.apache.org/WICKET/spring.html integration  very easy to achieve
(once you understand the fundamentals of Spring and Wicket); Spring Beans
can be injected into Wicket Components (often WebPages) by just marking
fields requiring injection with Wicket's @SpringBean annotation. The 
http://www.jweekend.com/ jWeekend site  uses a similar architecture to what
you'd probably end up with (in fact, we only use Hibernate's JPA API). The 
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/
Wicket-Phonebook example  is a good place to start and, as always, 
http://manning.com/dashorst/ Wicket In Action  is an invaluable resource. 

In terms of scalabilty and some of your other non-functional concerns, you
may also wish to take a look at Wicket- http://www.terracotta.org/
Terracotta   
http://www.nabble.com/wicket-terracotta-integration-is-out-to20362761.html#a20362761
integration  too.  

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk  


Kent Larsson-3 wrote:
> 
> Hi,
> 
> I have this 3-tier architecture in mind:
> 
> 1. Persistence: Hibernate in its pure form (i.e. not using it as a JPA
> persistence provider.)
> 2. Business: Manager classes annotated as Stateless Session Beans
> (SLSB's).
> 3. Presentation: Wicket
> 
> I thought I'd use Java Transaction API (JTA) using annotations on my
> SLSB methods. In other words, container managed persistence using EJB
> annotations. The persistence entities would more or less be pure
> structures without any logic, as the logic would reside in the
> business tier.
> 
> From the presentation tier, using Wicket, I'm wondering if any of you
> has any kind if smart model for this kind of architecture? I was
> thinking of if there is any good way to populate the model, see if
> things has changed (changed entity or deleted entity during user
> editing for example) so I may display warnings/errors, submit
> completed entity changes to the manager SLSB and such.
> 
> I'm tempted at changing Java EE for Spring. But I need a site with
> high availability and scalability, which means a clustered solution
> with replication, load-balancing and fail-over. And I have no
> experience with Spring, I'm sure it's possible, but it might take a
> longer time for me if I'd use it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Do-you-have-any-tips-regarding-smart-models-in-a-Java-EE-%28with-SLSB-manager-classes%29%2C-Wicket%2C-Hibernate-application--tp20513469p20514160.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org