[JBoss Tools (users)] - WIP: XForms editor based on VPE
by kukeltje
Hi,
The docbook example made me think that an XForms editor could be created using the VPE. It basically is xhtml, so I thought it would not be that difficult.
And... it turned out indeed not to be, at least not the basics. Almost the full set of xforms elements can be rendered in one way or another. Only the range and datepicker still need to be done, but that is just work.
Now I want to extend it in two directions:
- ctrl-click on an attribute value and be moved to the corresponding node (lots of in-document references are used)
- validation. e.g. if a referenced node does not exist put a red ~~~ under the attribute.
And later on even with code completion in attributes (referenced nodes e.g.)
I'd appreciate if someone could point me to locations in e.g. the existing jsf editor where these things are done so I can use it as an example. Up to now I was able to find my way around, but I seem to be lost now.
btw, I want this project to be opensource so if anyone is interested either in helping out or in giving it a try and provide feedback, let me know.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212600#4212600
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212600
17 years, 1 month
[EJB 3.0] - Re: Using WebBeans EJB integration in EEJB
by pete.muir@jboss.org
"wolfc" wrote : The underlying problem is that we don't have a (JTA) data source deployer in E-EJB3.
|
| jta-profile needs to move down the food chain. jpa-profile needs to be created and we need a simple jca-profile for the above. Then ejb3-embedded should be based on profile3_1 and your set to go.
For now Web Beans can manage without the PU resolver as that is a small area of functionality (for the WB tests, not for a WB user of course).
"ALRubinger" wrote : We're currently defining EjbReferenceResolver in ejb3-deployers-jboss-beans, which resides in ejb3-core.
This one is more urgent, as we have many tests relating to EJB functionality.
anonymous wrote : See how I do this in WebBeansBootstrapDeployer.
Thanks, I forgot to look there.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212587#4212587
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212587
17 years, 1 month
[EJB 3.0] - EJB Merge doesn't merge existing entities
by atish.singh
Hi everyone,
i have a client application (Batch) which accesses a self-written EJB Service (running on jboss AS 4.2.3).
Through this EJB Service the client can retrieve Entities, and merge changes back to the DB.
My Problem comes up when i try to use the EntityManager.merge() Method. Instead of overwriting the existing entity in the DB, it creates a new entry. Further iÃÂôve noticed that the old entry has Version-Column set to 1 and the new one has Version-Column set to 0.
I also tried to upgrade to the newest hibernate version but without success.
Can anyone come up with a solution, how to use the merge method? I appreciate any help!!!!
I've attached some of my sources:
merge-method call in EJB Service-Class
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public void updateDealer(Dealer dealer) {
| em.merge(dealer);
| em.flush();
| }
|
getEntity / getDealer Call in EJB Service Class
| public Dealer getDealer(int agDealerCode) {
| Dealer dealer = null;
|
| Query q = em.createQuery("From Dealer Where dealerNo = :dealerno");
|
| q.setParameter("dealerno", agDealerCode);
|
| try {
| dealer = (Dealer) q.getSingleResult();
| } catch (NoResultException nrEx) {
| // do nothing just return null value;
| }
| return dealer;
| }
|
Dealer Entity
| package ch.hstService.client.model;
|
| import java.io.Serializable;
| import java.util.ArrayList;
| import java.util.Collection;
| import java.util.HashSet;
| import java.util.Set;
|
| import javax.persistence.CascadeType;
| import javax.persistence.Column;
| import javax.persistence.Entity;
| import javax.persistence.FetchType;
| import javax.persistence.GeneratedValue;
| import javax.persistence.GenerationType;
| import javax.persistence.Id;
| import javax.persistence.JoinColumn;
| import javax.persistence.OneToMany;
| import javax.persistence.Table;
| import javax.persistence.Version;
|
| @Entity
| @Table(schema="HAENDLERSTAMM")
| public class Dealer implements Serializable {
|
| /******** Properties *******/
|
| @Id @GeneratedValue(strategy=GenerationType.SEQUENCE)
| @Column(name="id_dealer")
| private Long id = null;
|
| @Version
| private Long version;
|
|
| @Column(length=200)
| private String dpName;
|
| @Column(length=50)
| private String dealerType;
|
| @Column(name="market_name_official", length=200)
| private String marketNameOfficial;
|
| @Column(name="owner_dpname", length=200)
| private String ownerDpName;
|
| @Column(name="outlet_type_architectural", length=100)
| private String outletTypeArchitectural;
|
| @Column(length=200)
| private String name;
|
| @Column(name="additional_name", length=200)
| private String additionalName;
|
| @Column(name="vat_number", length=20)
| private String vatNumber;
|
| @Column(name="default_language", length=15)
| private String defaultLanguage;
|
| private int dealerNo;
|
| @Column(length=200)
| private String otherMakes;
|
| @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER )
| @JoinColumn(name="id_dealer",referencedColumnName = "id_dealer")
| private Set<Address> addresses = new HashSet<Address>();
|
| @OneToMany(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE}, fetch=FetchType.EAGER)
| @JoinColumn(name="id_dealer",referencedColumnName = "id_dealer")
| private Set<Email> emails = new HashSet<Email>();
|
| @OneToMany(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE }, fetch=FetchType.EAGER)
| @JoinColumn(name="id_dealer",referencedColumnName = "id_dealer")
| private Set<Phone> phones = new HashSet<Phone>();
|
| @OneToMany(mappedBy="dealer", cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE}, fetch=FetchType.EAGER)
| @JoinColumn(name="id_dealer")
| private Set<Contract> contracts = new HashSet<Contract>();
|
| @OneToMany(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE }, fetch=FetchType.EAGER)
| @JoinColumn(name="id_dealer",referencedColumnName = "id_dealer")
| private Set<URL> urls = new HashSet<URL>();
|
| /******** Konstruktoren *******/
|
| public Dealer() { //Paket-weiter Konstruktor
| }
|
|
| /******** Getter / Setter *******/
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212585#4212585
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212585
17 years, 1 month
[JBoss/Spring Integration] - Re: Installation, versions, etc...
by alesj
You're right, I should post some version compatibility info.
e.g. JBossAS 4.2.3 --> SpringDeployer 2.1
I'll do it asap, but anyway, thanks for warning me about the confusion. :-)
"tonioc" wrote :
| I am trying to understand how this thing works, my first basic doubt is:
| What files should I downloadl:
| - I will be using JBoss 4.2.3, Spring 2.5.6
| - It's not clear for me what version of SpringDeployer should I download
|
You should dl this one: SpringDeployer 2.1, jboss-spring-jdk5-2.5.jar
"tonioc" wrote :
| The second question is:
| If the version I download does not contain a .deployer distribution how do I deploy it to Jboss
|
The .deployer distribution doesn't change for major versions.
It's just META-INF/jboss-service.xml; deployer description
and jboss-spring.jar and of course spring.jar.
Download one of the full .deployer distros, and just change jboss-spring.jar.
As you can see, 2.1 has two versions of it, since 2.0.8 and 2.5.x Spring are not fully compatible wrt SpringDeployer.
"tonioc" wrote :
| The third question is:
| If I need to change spring version, it is enough just changing the jars
| (of course not major versions, just for example 2.5.6, 2.5.7)
|
Sure, it depends on the Spring compatibility.
But micro version changes should be fine.
"tonioc" wrote :
| Are there any docs aside from the example, where to look for info ?
|
There is a wiki and this forum.
The idea how this (SpringDeployer) works is described in the article.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212578#4212578
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212578
17 years, 1 month