[JBoss Tools (users)] - How to generate annotated Java classes from hbm.xml files
by baz
Hello,
we have a couple of old projects. The mapping is described in hbm.xml files.
We wish to migrate this to annotated Java classes.
We performed theses steps:
1. We generated a hibernate console configuration for our project.
2. opening hibernate perspective
3. Run / hibernate code generation
4. filling out the dialog on the main tab choosing the console configuration and selecting an output directory
on the exporters tab selecting Java 5 syntax and domain code generation
5 Run
Code is generated but without annotations. so we specified in step 4 generate ejb3 annotations. But this results in the following error and no code is generated.
org.hibernate.tool.hbm2x.ExporterException: Error while processing template pojo/Pojo.ftl
| Error while processing template pojo/Pojo.ftl
| freemarker.core.InvalidReferenceException: Expression pojo.generateManyToOneAnnotation is undefined on line 11, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.
| Expression pojo.generateManyToOneAnnotation is undefined on line 11, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.
| freemarker.core.InvalidReferenceException: Expression pojo.generateManyToOneAnnotation is undefined on line 11, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.
| Expression pojo.generateManyToOneAnnotation is undefined on line 11, column 3 in pojo/Ejb3PropertyGetAnnotation.ftl.
|
We are using JBoss Tolls 2.0.0GA
The projects we are trying to convert are JSF Projects created with the former Exadel studio.
Is it possible to convert our hbm.xml files to annotatd lava classes?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123747#4123747
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123747
18 years, 3 months
[JBoss Seam] - Re: SFSB vs. JavaBean
by EricJava
"msystems" wrote : Must be an error ! Seam POJO's are default EVENT (request) scoped and not conversation or temp. conversation scoped.
Indeed:
http://docs.jboss.org/seam/2.0.1.CR2/reference/en/html/concepts.html
anonymous wrote : By default, JavaBeans are bound to the event context.
which is not the same as the request, or the conversation, or the temporary conversation. Event is stateless.
Reading on in the doc:
anonymous wrote : However, they do not provide the functionality of a session bean (declarative transaction demarcation, declarative security, efficient clustered state replication, EJB 3.0 persistence, timeout methods, etc).
Is this correct? If I'm using a POJO and I put a @Restrict on it, that @Restrict is ignored? If that's the case, I probably can't use POJOs at all in my application, because nearly every operation is restricted.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123744#4123744
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123744
18 years, 3 months