[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2095) Multiple DataSources in same EAR, hib2ddl and import.sql run on all
by Ian Darwin (JIRA)
Multiple DataSources in same EAR, hib2ddl and import.sql run on all
-------------------------------------------------------------------
Key: JBSEAM-2095
URL: http://jira.jboss.com/jira/browse/JBSEAM-2095
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.CR1
Environment: EAR deployment, POJO beans setup by Seam-Gen. OS not relevant; tried JDK1.6 and 1.7EA. DB is PostgreSQL 8.
Reporter: Ian Darwin
When using multiple DataSources in an EJB3 EAR, as suggested by Gavin the the URL referenced below, using Hibernate as the underlying persistence, it appears that the "schema export" and the /import.sql get applied to both.
It would be nice if there could be a more fine-grained mechanism for associating import.sql and hbm2ddl with particular entities.
I have two Datasources, call them "all" and "bugs" (the idea being that the bugs database will be shared by all developers and should be permanent, whereas the "all" database should be dropped and recreated/imported
each tim).
16:07:55,345 INFO [SchemaExport] Running hbm2ddl schema export
16:07:55,345 INFO [SchemaExport] exporting generated schema to database
16:07:55,504 INFO [SchemaExport] Executing import script: /import.sql
16:07:55,568 INFO [SchemaExport] schema export complete
...
16:07:55,710 INFO [SchemaExport] Running hbm2ddl schema export
16:07:55,711 INFO [SchemaExport] exporting generated schema to database
16:07:55,857 INFO [SchemaExport] Executing import script: /import.sql
16:07:55,911 INFO [SchemaExport] schema export complete
It would be most convenient if one could specify more precisely which entities go in which Schema.
I have added the @PersistenceContext annotation on the BugsHome class' EntityManager:
@PersistenceUnit(name="tcpseambug")
@In EntityManager bugEntityManager;
public EntityManager getEntityManager() { return bugEntityManager; }
Note that if I disable the hbm2ddl export on the "bugs" database, then schema setup quits when one of the tables in the "all" database shows up missing.
N.B. Will be happy to write up a complete example for the Reference Manual once this is working :-), as there are several related questions on the Forums.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3903) CRUD is conversational, but seam-gen apps are not conversational enough
by Francisco Jose Peredo Noguez (JIRA)
CRUD is conversational, but seam-gen apps are not conversational enough
-----------------------------------------------------------------------
Key: JBSEAM-3903
URL: https://jira.jboss.org/jira/browse/JBSEAM-3903
Project: Seam
Issue Type: Feature Request
Affects Versions: 2.1.0.SP1
Reporter: Francisco Jose Peredo Noguez
Lets say you have 2 classes:
class Parent{
private Long id; private Integer version; private String name;
private Set <Child> children;
}
and
class Child{
private Long id;private Integer version; private String name;
private Parent parent;
}
with a typical one to many / many to one relationship (Parent.children.Child/Child.parent.Parent)
So you want them to become @Entities and add the required @Annotations. Then you run seam-gen on them, and run you generated application:
1. You click the Parent List menu option.
2. You are presented with the page ParentList.seam that allows you search parents, or to create a new one.
3. You click the Create parent button.
4. You write a name for the parent: "Peter".
5. You click "Save".
6. You are presented with the page Parent.seam, that displays you newly persisted entity in a "read-only way"
7. You click "Done"
so far so good... but then
1. You click the Child List menu option.
2. You are presented with the page ChildList.seam that allows you search children, or to create a new one
3. You click the Create child button.
4. You are presented with the page ChildEdit.seam.
5. You write a name for your new Child entity: "John"
6. You decide that you want connect this new Child entity with a parent entity, and then you click "Select parent".
7. You are presented again with ParentList.seam that allows you to "select" a parent.
8. So, you select "Peter" by clicking in the "Select" link
9. And you return to ChildEdit.seam, but the value for the name property of the Child is now LOST.
I think seam-gen should be able to do this correctly (without losing the values in ChildEdit.seam).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2050) reorganize modules
by Dan Allen (JIRA)
reorganize modules
------------------
Key: JBSEAM-2050
URL: http://jira.jboss.com/jira/browse/JBSEAM-2050
Project: JBoss Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 2.0.0.CR1
Reporter: Dan Allen
Fix For: 2.0.x
I would like to make "modules" a first order directory (renamed from "src") and also organize tests so they are per-module. This will encourage per-module tests and also prevent circular dependencies (because the folders are treated as modules and not one big lump of source code). The ui module also once again finds itself adjacent to the other modules.
jboss-seam/
examples/ <-- showing this just as a reference point
modules/
core/
main/java
test/java
ui/
main/java
test/java
(continue for debug, ioc, gen, pdf, mail, remoting)
Although Eclipse doesn't know the first think about multi-modules, this will be idea for setting up a module-aware IDE like IntelliJ IDEA (and to some degree, NetBeans).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1670) allow multiple scopes for @In annotation
by Dan Allen (JIRA)
allow multiple scopes for @In annotation
----------------------------------------
Key: JBSEAM-1670
URL: http://jira.jboss.com/jira/browse/JBSEAM-1670
Project: JBoss Seam
Issue Type: Patch
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Dan Allen
Priority: Minor
Fix For: 2.0.0.CR1, 2.0.0.GA, 2.0.1.GA
Right now, your only option for the scope on the @In annotation is an explicit scope or a hierarchical search of all the scopes. I can imagine that there are times when you want to look in a handful of scopes, but not all of them. For instance, anything within a conversation, but not above. Additionally, by making this a multi-value attribute, the developer can override the order in which the scopes are searched. They are searched in the order specified.
ScopeType[] scope() default {};
This would also eliminate the need for the UNSPECIFIED scope since no scopes would assume a hierarchical search. The logic that would have to change is Component#getValueToInject()
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1710) Support multiple life cycle methods (per inheritance) on JavaBean classes
by Dan Allen (JIRA)
Support multiple life cycle methods (per inheritance) on JavaBean classes
-------------------------------------------------------------------------
Key: JBSEAM-1710
URL: http://jira.jboss.com/jira/browse/JBSEAM-1710
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1, 2.0.0.CR1
Reporter: Dan Allen
Priority: Minor
EJB supports multiple life cycle methods for a bean, as long as two life cycle methods do not appear in the same class in the inheritance hierarchy. Thus, you can define a @PostConstruct method on the concrete class, and a different @PostConstruct method on its superclass.
As per the EJB specification (with minor corrections for clarity):
"Life cycle callback interceptor methods may be defined on super classes of the bean class, the bean class itself, or interceptor classes. However, a given class may not have more than one life cycle callback interceptor method for the same life cycle event."
The following comment is found in Component.java regarding this issue:
// TODO: check the EJB3 spec, I think you are allowed to have multiple life cycle methods on a bean!
The comment is correct in that multiple life cycle methods are not allowed on a single bean class. However, through inheritance, it is possible to have two different life cycle methods for the same Seam component.
Currently, Component#initMembers() works backwards up the inheritance chain while scanning methods. Therefore, the life cycle method on the highest member of the hierarchy currently wins. So, as it stands now, the handling of life cycle callbacks for JavaBeans is inconsistent with how they are handled by the EJB container on session and message-driven beans. I was able to verify this with a simple demonstration I conducted.
This incompatibility shouldn't be too difficult to fix. Just switch the life cycle method properties to an array and ensure that superclass methods are called first.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1389) Please make the methods parse and createPage protected instead of private.
by Chris Rudd (JIRA)
Please make the methods parse and createPage protected instead of private.
--------------------------------------------------------------------------
Key: JBSEAM-1389
URL: http://jira.jboss.com/jira/browse/JBSEAM-1389
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Chris Rudd
We have a dynamic routine that locates pages xml files from multiple locations. Since parse and createPage are private methods we cannot override and extend the Pages component without lifting the entire source and replicating it, or using reflection to get at those methods. Neither of these are good long term aproaches.
In general it seems that lots of the core components that one might want to extend to hook in additional functionality cannot be due to the use of private instead of protected methods.
The extended funtionality provided by the resolution to JBSEAM-715 does not rectify my issue as that relies on explitly defining the pages xml files. I believe there are several other people who are looking for a way to use an algorithm to locate them rather than a fixed list. Making those methods protected solves the problem as it allows anyone to extend the functionaliry of the Pages component to provide extended rules / algorithms for locating pages xml files, while not affecting the functionality of the core at all.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months