[JBoss Seam] - incremental hot deployment clarification
by dan.j.allen
There is some confusion (at least, I perceive there to be) over the purpose of the two source directories in the structure of projects created by seam-gen and how they relate to XML component configuration (via components.xml).
The two source directories are:
model
action
The names are slightly misleading. Here is an overview.
The model directory is treated as static. This means that once the application gets going, component definitions from the resulting classpath entry (WEB-INF/classes) remain in tact throughout the application's lifetime. (Read as: they are not hot redeployed).
The action directory is treated as dynamic. This means that if a change is detected in the classpath entry (a new version of a class appears in WEB-INF/dev), all the component definitions that originated from that directory are removed and it is rescanned for components. (Read as: they are hot redeployed).
The hot redeployable directory is an isolated, URL classloader. No classes or other classloaders can see these classes. That means that you cannot put a class in this directory and then define it as a component using XML in components.xml because the classloader that processes those definitions cannot see the classes in the hot redeployable directory.
I now arrive at my point, a call for change. I feel that "model" and "action" names are ill-suited for their purpose. Here is my proposal:
model -> static
action -> dynamic
other options include:
model -> standard
action -> dynamic or hot
model -> main
action -> redeployable
This change would affect projects created by seam-gen.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097212#4097212
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097212
18Â years, 9Â months
[JBoss Seam] - Re: Should you allow @Name on entity beans?
by dan.j.allen
The @Name on entity classes is already handled as a special case. Method interception is disabled. Here is what the @Name gives you for entity classes:
1. give access to entity class via a context variable name for convenience of capturing form data related to the entity without needing to do a factory or other type of initialization
2. allow a default scope to be assigned so that, again, you don't have to do special factory stuff to get a fresh entity instance in conversation scope (which is the default)
3. ability to create a prototype of an entity class using component configuration (configure the properties in components.xml)
I don't think there is any harm in doing it. Whether or not you choose to make your entity classes Seam components by giving them a @Name annotation is up to you. If you don't use the @Name annotation, you can always do the same thing via XML in components.xml. There really is no harm in doing so.
Remember, entity class components are restricted components in that they have:
no bijection
no transactions
no event handling
etc.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097211#4097211
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097211
18Â years, 9Â months