JBoss (java 1.4 + hibernate -> java 1.5)

I

iraptor

hi,

I'm searching for a documents describing the things to get in mind so
that if I build now
application for java 1.4+hibernate to be as much as possibly 1.5 ready,
with minimum changes afterwards.
Examples, links, documentations, whitepapers .... are welcome.
I'm talking primary about JBoss.

tia
 
O

ozgwei

i also meaned ejb 2.1+hibernate -> ejb3.0 :)

I don't recommend you to use ejb2.1 as it is completely different from
ejb3, as EJB3 beans are just empowered POJOs.

Instead, you probably should use j2ee1.4 + Spring + Hibernate. EJB3 has
a lot of commonality with Spring:
* Business interfaces do not have to extend EJB Interface
* No more home interface
* Use Dependency Injection
* Business methods in remote EJB are not required to throw
RemoteException
* Meta data can be embedded in source code, such as annotation in Java
EE 5 and Spring (in J2EE 1.4 with JVM 5) or Commons Attribute in Spring
(in J2EE 1.3 or 1.4 with JVM 3 or 4).
 
I

iraptor

the problem is that I have idea of Hibernate and Spring, but just the
idea...and the time is tight..
But anyway thanks I think that is the right way...'cause when I have
all the logic as POJO wrapped around Hibernate+Spring, if I want to
move to EJB3.0 will preserve these POJO objects and rewrite just the
rest wich as idea should be similar 'cause EJB stole alot from them...
Of cource there should be some drawbacks too ? :)
Is there some info how Hibernate+Spring can be blended into EJB3.0 ?

thanx again
 
O

ozgwei

the problem is that I have idea of Hibernate and Spring, but just the
idea...and the time is tight..

Depending on how tight your time is, using Hibernate and Spring may
actually speed up your development, as you don't need to write all
those codes to do JNDI lookup, loading properties file or parsing XML
configuration files.
Is there some info how Hibernate+Spring can be blended into EJB3.0 ?

Use JPA (Java Persistence API) in EJB3.0. The API should be similar to
Hibernate's native API.

As for EJB3.0, you let the application server to do dependency
injection while using Spring for other configuration management.
Exactly how to do this, I have no idea.You should probably wait and see
what other people have tried...

You may go to Spring's website and read their documentation on EJB
support in Spring 2.0, if there is any.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top