[Remoting] - Re: About the usage of path in InvokerLocator
by beve
Hi,
sorry for highjacking your post but I have a similar question...
We are using JBossRemoting listeners in the JBossESB. There are both socket listeners and http listeners.
We need to be able to have multiple of these listeners listen to the same host/port combination which we have solved by sharing Connectors and using subsystems to seperate the different listeners. This is so that we don't have to be opening a lot of ports, specially as we have quite a few webservices and more coming.
The issue we are having is that for webservices we need to have a way to determine which subsystem a http request is for.
This is easy when the calling client is a JBR client but not when the request is a http request.
This is what I've been using up until now:
Code from ServerInvoker's invoke(InvocationRequest)
| Map requestPayload = invocation.getRequestPayload();
| if ( subsystem == null && requestPayload != null )
| {
| String path = (String) requestPayload.get( HTTPMetadataConstants.PATH );
| subsystem = path.substring( path.indexOf( '/' ) + 1 );}
| }
|
Is there some way we can achive this by configuration of by using some other class in remoting?
Thanks,
Daniel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132237#4132237
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132237
18 years, 1 month
[Persistence, JBoss/CMP, Hibernate, Database] - JPA, Embedded class containing an entity class, Help!
by yanfengzhang
I got several classes like below in my project which uses JPA as persistence layer:
| //an entity class
| class Country{
| Long id;
| String name;
| }
|
| //an embedded class (a.k.a component)
| class Address{
| Country country; //many to one mapping here
| String province;
| String street;
| }
|
| //an entity class
| class Person{
| Long id;
| Address homeAddress; //which is an embedded class here, I used AttributeOveride annotation here
| Address workingAddress; //also an embedded class
| }
|
I used AttributeOverride to map Address class into Person class. But, unfortunately, the homeAddress and workingAddress is mapped as RAW colums in oracle database -- it is unacceptable for my DBA.
How can I generate a right mapping for this situation? It would be nice if the Person class could be mapped as the follwoing:
| Table Person(
| id integer,
| homeAddress_country integer, --id of the country entity for home address
| homeAddress_province varchar2,
| homeAddress_street varchar2,
| workingAddress_country integer, --id of the country entity for working address
| workingAddress_province varchar2,
| workingAddress_street varchar2,
| )
I read the hibernate annotation document. It mentioned an example in which the Country class is also an embedded class and said that JPA does not support AttributeOverride for embedded class within an embedded class. (http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.ht...).
My question is that:
1. Does hibernate support this kind of mapping?
2. If yes, can I mix hibernate annotation and JPA annotation in a JavaEE project which is targetted to running on JBoss platform? what specific jars should I import?
Any ideas?
Thanks in advance!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132235#4132235
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132235
18 years, 1 month