[EJB 3.0] - @SecondaryTable
by NigelWhite
I'm trying to pull in columns from two tables.
Most of the columns work fine - they are simple columns, and I can specify which table they come from.
The trouble is when one of the properties on the secondary table is an @ManyToOne association.
There's no way of informing the persistence provider (We're using Hibernate 3.2 on JBoss 4.2.0.GA) through that annotation that this column is on the secondary table.
I get
| javax.servlet.ServletException: org.hibernate.AnnotationException: @Column(s) not allowed on a @ManyToOne property: com.aspicio.entity.base.ContactPerson.player
|
If I use
| @column(table="ContactDetails")
| @ManyToOne(fetch=FetchType.LAZY, optional = false)
| private Player player;
|
Do I just have to map this as an unlinked key:
| @column(table="ContactDetails", name="player_id")
| private Long playerId;
|
and add a hand-coded getter which explicitly fetches the associated Player entity??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053897#4053897
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053897
18Â years, 11Â months
[JBossWS] - Re: asynchronous webservice posible with jboss ?
by zauberlehrling
I tried the following:
package ws
|
| import javax.jws.Oneway;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.ejb.Stateless;
|
|
| @WebService
| @Stateless
| public class Hotel {
|
| @Oneway
| @WebMethod
| public void
| reserve(String input) {
| System.out.println("input: "+input);
| for (int i =0; i < 60; i++) {
| try {
| Thread.sleep(1000);
| } catch (InterruptedException e) {
| e.printStackTrace();
| }
| System.out.println("i: "+i);
| }
| }
| }
According to the JAX-WS User Guide it should be an asynchronous webservice because of the annotation @Oneway. But it's not.
I've tested this JBoss-4.2.0.GA and jboss-5.0.0.Beta2. The call to
this webservice is blocking. Any help is appreciated!
Thanks in adavance for any help,
Frank
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053896#4053896
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053896
18Â years, 11Â months
[JBoss Seam] - ConversionException on HashMap during Remoting
by fguerzoni
Seam 1.2.1.GA
jdk_5.0.12
win xp
Hi,
I get a ConversionException from MapWrapper when calling a @WebRemote method which accepts as parameter a HashMap<String,String>.
Caused by: org.jboss.seam.remoting.wrapper.ConversionException: Could not create value of type [java.util.LinkedHashMap<
| java.lang.String, java.lang.String>]
| at org.jboss.seam.remoting.wrapper.MapWrapper.convert (MapWrapper.java:101)
| at org.jboss.seam.remoting.wrapper.BeanWrapper.unmarshal(BeanWrapper.java:119)
|
I verified that xml produced by client is correct.
Switching from HashMap<String,String> to Map<String,String> solves the problem.
Same problem happens when I send to server a seam object which has a Map property and this property is not declared as Map, but HashMap or LinkedHashMap.
I'm wondering if it's possible to use HashMap with remoting (I haven't found in docs anything against it) or it's simply a bug.
thanks
regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053893#4053893
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053893
18Â years, 11Â months
[JBoss Seam] - Re: Update example: how to do ?
by miloslav.vlach
| <h:form>
| <fieldset>
| <legend><h:outputText value="#{messages['zakladni.informace']}" /></legend>
| <table class="full">
| <tr>
| <td colspan="2">
| <table class="full">
| <tr>
| <td>obrazek1</td>
| <td>anotacni text</td>
| <td>obrazek2</td>
| </tr>
| </table>
| </td>
| </tr>
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['author.name']}" />:</ui:define>
| <h:inputText value="#{viewArticle.authorName}" />
| </s:decorate>
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['article.title']}" />:</ui:define>
| <h:inputText value="#{viewArticle.title}" />
| </s:decorate>
| <tr>
| <th>Ikonky</th>
| <td>nejake ikonkty</td>
| </tr>
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['intro.text']}" /></ui:define>
| <h:inputTextarea value="#{viewArticle.introText}" />
| </s:decorate>
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['full.text']}" /></ui:define>
| <h:inputTextarea value="#{viewArticle.fullText}" />
| </s:decorate>
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['article.keywords']}" />:</ui:define>
| <h:inputText value="#{viewArticle.keywords}" />
| </s:decorate>
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['article.description']}" />:</ui:define>
| <h:inputText value="#{viewArticle.descriptions}" />
| </s:decorate>
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['article.links']}" />:</ui:define>
| <h:inputTextarea value="#{viewArticle.links}" />
| </s:decorate>
|
| <s:decorate template="/edit.xhtml">
| <ui:define name="label"><h:outputText value="#{messages['article.gallery']}" />:</ui:define>
| <h:selectOneMenu value="#{viewArticle.galleryId}">
| <f:selectItems value="#{galleryComboAction.galleries}" />
| </h:selectOneMenu>
| </s:decorate>
| <tr>
| <td colspan="2">
| <h:commandButton value="Upravit" action="#{articleEditAction.save}" />
| </td>
| </tr>
| </table>
| </fieldset>
| </h:form>
|
| <?xml version="1.0" encoding="UTF-8"?>
| <!-- incident view - action execute before show -->
| <page view-id="/admin/actions/article/articleedit.xhtml">
| <param name="id" value="#{article.id}" />
| <action execute="#{articleEditAction.load(article.id)}" />
| </page>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053892#4053892
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053892
18Â years, 11Â months