[JBoss Seam] - SINGLE_TABLE strategy: problem with remoting traslation to j
by fguerzoni
Jboss seam 1.0.1 GA
JBoss 4.0.4GA (ejb3 config)
EJB-3.0_RC8-FD
Hello,
my java model has 6 entity beans which inherit from a parent class where I put all the pojo stuff. I followed the single table strategy with discriminator.
So the relational model results in a single table that contains data from all of 6 entities.
The problem I found relates to the translation to javascript objects that Seam produces automagically. In fact in the interface javascript there is no evidence at all of the pojo stuff that belongs to the parent class. There can be eventually only specific properties and methods that belong only to the child class.
It seems that the Seam producer inspects only one class at time, not navigating the parent object.
As a workaround writing manually the missing objects in the interface javascript makes all the things go well.
My parent class (fragment) is
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "tipoFlag", discriminatorType = DiscriminatorType.STRING)
@Table(name = "bo_indirizzi")
@Name("cbi.model.bo.BoIndirizzo")
public class BoIndirizzo implements Serializable {
...
}
One of my child classes (complete) is
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue(CostantiCbi.INDORDEBITORE)
@Name("cbi.model.bo.BoOrDebitore")
public class BoOrDebitore extends BoIndirizzo implements Serializable {
private static final long serialVersionUID = 1L;
}
Did anyone experienced that?
best regards
Filippo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974158#3974158
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974158
19 years, 7 months
[EJB 3.0] - Re: ejb3 timers persistence
by galo.navarro
I posted the same question a few days ago, it seems persistence is to be supported in the next major release.
I'm getting around the problem with a scheduler service. This goes to the jboss-service.xml file
| <mbean code="org.jboss.varia.scheduler.Scheduler" name="jboss:custom=Scheduler">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableMBean">jboss:custom=MyBean</attribute>
| <attribute name="SchedulableMBeanMethod">process()</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">60000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| </mbean>
|
and process() is run every minute on MyBean
I believe this can be configured to run methods on a simple POJO etc. but haven't tried. Let me know if you need more details and I will post a couple of links.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974155#3974155
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974155
19 years, 7 months
[JBossWS] - fail to load tomcat with jbossws
by haplo_3
hey i'm newbie here so hopefully its not too simple question
i download jbossws-1.0.3.GA.zip and copied the files to the nesscry places
same as specified in the installation guide.
when i'm running 'catalina.bat run' i'm getting
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
Caused by: java.lang.NoClassDefFoundError: org/xml/sax/ext/Attributes2
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:485)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:820)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at org.apache.xerces.parsers.AbstractSAXParser.(Unknown Source)
at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at org.apache.commons.digester.Digester.getParser(Digester.java:686)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
... 6 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974152#3974152
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974152
19 years, 7 months
[JBoss Seam] - Re: JBPM and Seam integration. What am I doing wrong?
by Jump
"gavin.king(a)jboss.com" wrote :
| No. Follow the example apps and the reference documentation. Don't try and invent new ways of doing things until you really understand how the standard way works.
What are standart ways? TODO sample app? But what if I need to assign task firs and than start it? Well, actually, I sloved that problem, but I dont like my suggestion. First of all I made 2 tables
1)
<h:dataTable value="#{pooledTaskInstanceList}"
var="task"
styleClass="dvdtable"
headerClass="dvdtablehead"
rowClasses="dvdtableodd,dvdtableeven"
columnClasses="dvdtablecol">
..........................................
<h:column>
<s:link action="#{pooledTask.assignToCurrentActor}" taskInstance="#{task}" value="Pick task" linkStyle="button"/>
</h:column>
..........................................
</h:dataTable>
2)
<h:dataTable value="#{taskInstanceList}"
var="task"
styleClass="dvdtable"
headerClass="dvdtablehead"
rowClasses="dvdtableodd,dvdtableeven"
columnClasses="dvdtablecol">
................................................
<h:column>
<s:link action="#{taskManager.startTask}" taskInstance="#{task}" value="Start task" linkStyle="button"/>
</h:column>
<h:column>
<s:link action="#{taskManager.endTask}" taskInstance="#{task}" value="end task" linkStyle="button"/>
</h:column>
..................................................
</h:dataTable>
then I modified TaskManagerImpl
@Name("taskManager")
public class TaskManagerImpl {
@Logger
Log log;
public String getTest() {
return "test";
}
public void startTask() {
String taskId = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("taskId");
System.out.println("taskId is " + taskId);
TaskInstance taskInstance = (TaskInstance) ManagedJbpmContext.instance().getTaskMgmtSession().loadTaskInstance( Long.parseLong(taskId) );
taskInstance.start();
}
public void endTask() {
String taskId = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("taskId");
System.out.println("taskId is " + taskId);
TaskInstance taskInstance = (TaskInstance) ManagedJbpmContext.instance().getTaskMgmtSession().loadTaskInstance( Long.parseLong(taskId) );
taskInstance.end();
}
}
It works now, but it looks ugly/ Are there any other ways?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974148#3974148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974148
19 years, 7 months