[Persistence, JBoss/CMP, Hibernate, Database] - managing nomenclators with Entity Beans
by maykellff
Hi all, i have a design question.
I have a table named eyeType with and id and a value fields
eyeType
id : Integer
value : VarChar <assian eye, round eye, large eye, spread eye, ect....>
And i have a Person entity bean that map to table named person, this entity bean have like fields an id, a name, an address, ....., and an eyeType field. At data base level a one to many relationship between the tables eyeType and person is defined.
Now i would like that when i load a Person entity from the data base the field eyeType came with its explicit value not with the id corresponding in the eyeType table.
?How can i do that, there is some EJB3 or Seam or Hibernate anotation trick that i can use?
I hope your cooperation,
thank you,
Maykell.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105162#4105162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105162
18 years, 8 months
[JBoss Messaging] - Re: Message stranded in cluster
by chip_schoch
We use the windows servers to run some conversion services that use third party libs that are only available on windows. As the load increases we will be adding more conversion instances, so it really will be assymetrical.
It seems a bit self defeating if we need to manually manage which linux server in the cluster a windows converter connects to. It seems that we would be better off running jms as an ha-singleton in the cluster to avoid the unnecessary redistribution you describe.
I will try the latest release. As for the other questions.
1. Yes the queues have the 'Clustered' attribute set to true.
2. The clusters are seeing each other.
I actually have a singleton service that is running on one of the linux servers that queues messages to a clustered queue. It uses the ClustereXAConnectionFactory and appears to be round-robining the messages it queues, which would indicate that the cluster is working correctly. It is the consumers that are only getting messages off one of the partial queues.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105153#4105153
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105153
18 years, 8 months
[JBoss Seam] - Re: Stateless Session Bean and @Out
by jfrankman
>From the documentation for the @Out annotation:
Specifies the scope to outject to. If no scope is explicitly specified, the default scope depends upon whether the value is an instance of a Seam component. If it is, the component scope is used. Otherwise, the scope of the component with the @Out attribute is used. But if the component scope is STATELESS, the EVENT scope is used. - http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/seam/api/org/j...
Here is how I understand it
If scope is explicitly specified:
| the specified scope is used
| otherwise:
| if the outjected variable is a seam component:
| The seam component's scope is used
| otherwise
| If scope of the component outjecting the variable is stateless
| event scope is used
| otherwise
| the scope of the component outjecting the variable is used
Looking at my example I would say that the List I am trying to outject is not a seam component. (The objects contained in the list are seam components, but the List being outjected is not). That is based on my understanding that a Seam component is declared with the @Name annotation. Is this correct? If anyone can confirm this or set me straight I would appreciate it.
This brings up more questions.
1. What is the difference between doing this:
@Stateless
| @Name("clientTransmittalLineItemAction")
| public class MySessionBeanImpl implements MySessionBean
| {
and this?:
@Stateful
| @Name("clientTransmittalLineItemAction")
| @Scope(ScopeType.STATELESS)
| public class MySessionBeanImpl implements MySessionBean
| {
2. Is the second option even possible?
3. T or F? if you have a stateless session bean there is not any point in using the @Scope annotation.
4. T or F? If you have a stateful session bean you can specify any scope using the @Scope annotation other than ScopeType.STATELESS
It seems that 90% of Seam examples in books and online all use SFSB. I am trying to understand when and how a SLSB would be better to use than a SFSB. Any help is appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105148#4105148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105148
18 years, 8 months