[JBoss Portal] - JBOSS portal takes forever to start
by Boris Bardak
Boris Bardak [http://community.jboss.org/people/borbar] created the discussion
"JBOSS portal takes forever to start"
To view the discussion, visit: http://community.jboss.org/message/582444#582444
--------------------------------------------------------------
Hi.We use JBoss Portal 2.7.2.
When we start Jboss portal, we have problem with CMS.It takes forever to start CMS.
When we starting Jboss portal,error was:
08:29:12,519 INFO [JBossCachePersistenceManager] Pre-loading the PersistenceMan
09:17:25,935 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id a000414:c982:4d36921b:b invoked while multiple threads active within it.
09:17:25,936 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action a000414:c982 :4d36921b:b aborting with 1 threads active!
In this case portal won't start.
After we increase timeout period from 300 to 10 000 (like this):
<!-- JBoss Transactions JTA -->
<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
name="jboss:service=TransactionManager">
<attribute name="TransactionTimeout">10000</attribute>
<attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
</mbean>
Jboss Portal starts "normaly" but it takes forever to start!!!
INFO [org.jboss.portal.cms.impl.jcr.JCRCMS] Started JCR CMS in: 74m:53s:59ms
CMS is on FileSystem.
In server.log file it stops at this point:
12:26:49,658 INFO [JBossCachePersistenceManager] Pre-loading the PersistenceManager Cache for/wsp_node (finished).......
12:26:52,309 INFO [JBossCachePersistenceManager] Pre-loading the PersistenceManager Cache for/wsp_prop (finished).......
12:27:06,194 INFO [JBossCachePersistenceManager] Pre-loading the PersistenceManager Cache for/version_ref (finished).......
12:28:18,358 INFO [JBossCachePersistenceManager] Pre-loading the PersistenceManager Cache for/version_node (finished).......
12:33:26,756 INFO [JBossCachePersistenceManager] Pre-loading the PersistenceManager Cache for/version_prop (finished).......
and wait here forever.When we change log level it continuesly repeating this:
2011-01-21 13:07:34,262 DEBUG [org.hibernate.transaction.JTATransaction] commit
2011-01-21 13:07:34,262 DEBUG [org.jbpm.JbpmContext] end user JTA transaction
2011-01-21 13:07:34,263 DEBUG [org.jbpm.JbpmContext] end jta transation with COMMIT
2011-01-21 13:07:34,263 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction before completion callback
2011-01-21 13:07:34,263 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically flushing session
2011-01-21 13:07:34,263 DEBUG [org.hibernate.impl.SessionImpl] automatically flushing session
2011-01-21 13:07:34,263 DEBUG [org.hibernate.jdbc.JDBCContext] before transaction completion
2011-01-21 13:07:34,263 DEBUG [org.hibernate.impl.SessionImpl] before transaction completion
2011-01-21 13:07:34,263 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction after completion callback, status: 3
2011-01-21 13:07:34,263 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction completion
2011-01-21 13:07:34,263 DEBUG [org.hibernate.impl.SessionImpl] after transaction completion
2011-01-21 13:07:34,263 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically closing session
2011-01-21 13:07:34,263 DEBUG [org.hibernate.impl.SessionImpl] automatically closing session
2011-01-21 13:07:34,263 DEBUG [org.hibernate.impl.SessionImpl] closing session
2011-01-21 13:07:34,263 DEBUG [org.hibernate.jdbc.ConnectionManager] connection already null in cleanup : no action
2011-01-21 13:07:34,263 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@4978fa
2011-01-21 13:07:34,264 DEBUG [org.jbpm.job.executor.JobExecutorThread] obtained locks on following jobs: []
2011-01-21 13:07:34,264 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, persistence]'
2011-01-21 13:07:34,264 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@1a59fb4
2011-01-21 13:07:34,264 DEBUG [org.jbpm.JbpmContext] start user JTA transaction
2011-01-21 13:07:34,264 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
2011-01-21 13:07:34,264 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 5306825335865344
2011-01-21 13:07:34,264 DEBUG [org.jbpm.persistence.db.DbPersistenceService] using current hibernate session SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
2011-01-21 13:07:34,264 DEBUG [org.jbpm.persistence.db.DbPersistenceService] beginning hibernate transaction
2011-01-21 13:07:34,264 DEBUG [org.hibernate.transaction.JTATransaction] Looking for UserTransaction under: UserTransaction
2011-01-21 13:07:34,264 DEBUG [org.hibernate.transaction.JTATransaction] Obtained UserTransaction
2011-01-21 13:07:34,264 DEBUG [org.hibernate.transaction.JTATransaction] begin
2011-01-21 13:07:34,264 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction begin
2011-01-21 13:07:34,264 DEBUG [org.jbpm.persistence.db.DbPersistenceService] begun hibernate transaction org.hibernate.transaction.JTATransaction@a09e05
2011-01-21 13:07:34,265 DEBUG [org.hibernate.engine.query.QueryPlanCache] located HQL query plan in cache (
select job
from org.jbpm.job.Job as job
where ( (job.lockOwner is null) or (job.lockOwner = :lockOwner) )
and job.retries > 0
and job.isSuspended != true
order by job.dueDate asc
)
2011-01-21 13:07:34,265 DEBUG [org.hibernate.engine.query.QueryPlanCache] located HQL query plan in cache (
select job
from org.jbpm.job.Job as job
where ( (job.lockOwner is null) or (job.lockOwner = :lockOwner) )
and job.retries > 0
and job.isSuspended != true
order by job.dueDate asc
)
2011-01-21 13:07:34,265 DEBUG [org.hibernate.engine.query.HQLQueryPlan] find:
select job
from org.jbpm.job.Job as job
where ( (job.lockOwner is null) or (job.lockOwner = :lockOwner) )
and job.retries > 0
and job.isSuspended != true
order by job.dueDate asc
2011-01-21 13:07:34,265 DEBUG [org.hibernate.engine.QueryParameters] named parameters: {lockOwner=JbpmJobExector:10.0.4.20:1}
2011-01-21 13:07:34,265 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2011-01-21 13:07:34,265 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2011-01-21 13:07:34,265 DEBUG [org.hibernate.SQL]
/* named HQL query JobSession.getFirstDueJob */ select
job0_.ID_ as ID1_205_,
job0_.VERSION_ as VERSION3_205_,
job0_.DUEDATE_ as DUEDATE4_205_,
job0_.PROCESSINSTANCE_ as PROCESSI5_205_,
job0_.TOKEN_ as TOKEN6_205_,
job0_.TASKINSTANCE_ as TASKINST7_205_,
job0_.ISSUSPENDED_ as ISSUSPEN8_205_,
job0_.ISEXCLUSIVE_ as ISEXCLUS9_205_,
job0_.LOCKOWNER_ as LOCKOWNER10_205_,
job0_.LOCKTIME_ as LOCKTIME11_205_,
job0_.EXCEPTION_ as EXCEPTION12_205_,
job0_.RETRIES_ as RETRIES13_205_,
job0_.NAME_ as NAME14_205_,
job0_.REPEAT_ as REPEAT15_205_,
job0_.TRANSITIONNAME_ as TRANSIT16_205_,
job0_.ACTION_ as ACTION17_205_,
job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_205_,
job0_.GRAPHELEMENT_ as GRAPHEL19_205_,
job0_.NODE_ as NODE20_205_,
job0_.CLASS_ as CLASS2_205_
from
JBPM_JOB job0_
where
(
job0_.LOCKOWNER_ is null
or job0_.LOCKOWNER_=?
)
and job0_.RETRIES_>0
and job0_.ISSUSPENDED_<>true
order by
job0_.DUEDATE_ asc limit ?
2011-01-21 13:07:34,265 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2011-01-21 13:07:34,266 DEBUG [org.hibernate.type.StringType] binding 'JbpmJobExector:10.0.4.20:1' to parameter: 1
2011-01-21 13:07:34,267 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2011-01-21 13:07:34,267 DEBUG [org.hibernate.loader.Loader] processing result set
2011-01-21 13:07:34,267 DEBUG [org.hibernate.loader.Loader] done processing result set (0 rows)
2011-01-21 13:07:34,267 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2011-01-21 13:07:34,267 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2011-01-21 13:07:34,267 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2011-01-21 13:07:34,267 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2011-01-21 13:07:34,267 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
Finally,when CMS (after 70 to 80 minutes) is up everything else goes up very quicky.
We also use LDAP,Postgresql for portal and Hypersonic for AS.
Does anybody knows what to be a issue here?
OS is CentOS 5.3 32-bit.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582444#582444]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[EJB3] - Inverse OneToOne and JoinTable problem
by Chris Ball
Chris Ball [http://community.jboss.org/people/chrisxl] created the discussion
"Inverse OneToOne and JoinTable problem"
To view the discussion, visit: http://community.jboss.org/message/582412#582412
--------------------------------------------------------------
I have come across a problem in JBoss 4.2.2 (hibernate 3.2.4) where I cannot insert into or select from an entity (CompanyCar) that is the inverse-side of a @OneToOne join to a second entity (Employee), when the second entity has a @ManyToOne join that uses a @JoinTable.
This is also a problem in JBoss 5.1, but it appears to have been “fixed” in JBoss 6.0 (hibernate 3.6). Unfortunately we are not yet in a position to consider upgrading the version of JBoss we use.
I am looking for a workaround that we can use for JBoss 4.2.2. Also I’d like to know if this looks like a genuine bug, or whether I have got something wrong with my entity model that for some reason the hibernate spec has been changed to allow in the later release.
My entity model:
public class CompanyCar implements Serializable {
private Long id;
private Employee employee;
@Id
@Column(name = "id", nullable = false)
public Long getID() {
return id;
}
public void setID(final Long id) {
this.id = id;
}
@OneToOne(mappedBy="car",optional = true, fetch = FetchType.LAZY)
public Employee getEmployee() {
return employee;
}
public void setEmployee(final Employee employee) {
this.employee = employee;
}
}
public class EmployeeTeam implements Serializable {
private String teamName;
private Collection<Employee> members;
@Id
@Column(name = "teamname", length = 30, nullable = false)
public String getTeamName() {
return teamName;
}
public void setTeamName(final String teamName) {
this.teamName = teamName;
}
@OneToMany(mappedBy = "team")
public Collection<Employee> getMembers() {
return members;
}
public void setMembers(final Collection<Employee> members) {
this.members = members;
}
}
public class Employee implements Serializable {
private String employeeID;
private CompanyCar car;
private EmployeeTeam team;
@Id
@Column(name = "employeeid", length = 36, nullable = false)
public String getEmployeeID() {
return employeeID;
}
public void setEmployeeID(final String employeeID) {
this.employeeID = employeeID;
}
@OneToOne(optional = true, fetch = FetchType.LAZY)
@JoinColumn(name = "companycarid", referencedColumnName = "id")
public CompanyCar getCar() {
return car;
}
public void setCar(final CompanyCar car) {
this.car = car;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinTable(
name = "employeeteammembers",
joinColumns = { @JoinColumn(name = "employee_fk", referencedColumnName ="employeeid") },
inverseJoinColumns = @JoinColumn(name = "team_fk", referencedColumnName = "teamname")
)
public EmployeeTeam getTeam() {
return team;
}
public void setTeam(final EmployeeTeam team) {
this.team = team;
}
}
On inserting a CompanyCar:
final CompanyCar car = new CompanyCar();
car.setID(1L);
entityManager.persist(car);
not-null property references a null or transient value: uk.co.exel.test.CompanyCar.employee
On loading a CompanyCar:
Invalid column name 'companycarid'
The following SQL is generated by hibernate. It is attempting to join the CompanyCar directly to EmployeeTeam?
select companycar0_.id as id0_, companycar0_1_.employee_fk as employee0_3_
from companycars companycar0_
left outer join employeeteams companycar0_1_ on companycar0_.id=companycar0_1_.companycarid
Many thanks for any comments / suggestions.
Chris.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582412#582412]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[jBPM] - jBPM5, Oryx and global elements required by serviceTask
by vsp
vsp [http://community.jboss.org/people/vsp] created the discussion
"jBPM5, Oryx and global elements required by serviceTask"
To view the discussion, visit: http://community.jboss.org/message/582196#582196
--------------------------------------------------------------
This question mostly applies to the Oryx editor, but I'm asking it here since it ties into the model execution by jBPM. Please let me know if this is not the right forum for these type of questions.
In order to use the BPMN's serviceTask functionality, one needs to define global elements like itemDefinition, message, interface and operation. AFAIK, Oryx does not support defining these elements, as well as process-wide elements, such as property.
Do you know whether there are any plans to add support for these elements in Oryx? My question was triggered by this recently released Eclipse-based BPMN editor - http://koentsje.blogspot.com/2010/12/eclipsing-bpmn-20.html http://koentsje.blogspot.com/2010/12/eclipsing-bpmn-20.html -, which has support for these elements in the "Definitions View" and process's "Details View". Currently, I'm transforming the Oryx-produced BPMN into jBPM-executable BPMN via XSLT. Does anybody have a better solution to share?
Thank you for your time.
Vlad
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582196#582196]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Messaging] - How to send Message to a WebSphere QUEUE througth a jms ds configured in JBoss AS 5.0
by Andrea Cacciatori
Andrea Cacciatori [http://community.jboss.org/people/backendista] created the discussion
"How to send Message to a WebSphere QUEUE througth a jms ds configured in JBoss AS 5.0"
To view the discussion, visit: http://community.jboss.org/message/582069#582069
--------------------------------------------------------------
Hi to all!
Sorry for the answer but I'm a newbie.
I try to configure a external queue datasource in JBoss AS 5.0.
I want to sent throught jms api a string messages to my custom queue resident on a particular host.
I want only to set a pointer to this queue like i do for my oracle-ds.
I try to follow this guides:
http://www.ibm.com/developerworks/websphere/library/techarticles/0710_rit... http://www.ibm.com/developerworks/websphere/library/techarticles/0710_rit...
But i need this rar library *wmq.jmsra.rar.*
*Is there anyone that can send me this file at mailto:ciccathebest@gmai.com ciccathebest(a)gmai.com?? i don't be able to find in internet :0*
i try to assemle with this jar (
* com.ibm.mq.jar, which contains WebSphere MQ base Java
* com.ibm.mqjms.jar, which contains WebSphere MQ JMS
* mqconnector.jar, which contains the WebSphere MQ implementation of the JCA interfaces (in this case i use connector.jar i think it's the same)
* dhbcore.jar
)but when i deploy it seems doesn't runs.
Error determining structure: *wmq.jmsra.rar*
Moreover I create this ds file: *wmq.jmsra-ds.xml:*
*with my custom configuration like this:*
:)
<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
<!-- mbeans defining JCA administered objects -->
<!-- JCA Connection factory definitions -->
<tx-connection-factory>
<!-- Bind this ConnectionFactory with the JNDI name IVTCF -->
<jndi-name>jms/jabsQMGR</jndi-name>
<!-- Indicate that the connection factory supports XA transactions -->
<xa-transaction />
<!-- rar-name is the actual RAR file name, in this case wmq.jmsra.rar -->
<rar-name>wmq.jmsra.rar</rar-name>
<!-- connection-definition is the ConnectionFactory interface
defined in the ra.xml -->
<connection-definition>javax.jms.ConnectionFactory</connection-definition>
<!--
Configuration for the ConnectionFactory. This defines the channel, hostname, port,
queueManager, and transportType properties for a client (TCP/IP) connection to WMQ
-->
<config-property name="channel" type="java.lang.String">name of the channel</config-property>
<config-property name="hostName" type="java.lang.String">localhost</config-property>
<config-property name="port" type="java.lang.String">1416</config-property>
<config-property name="queueManager" type="java.lang.String">ADSQS1XTSC1</config-property>
<config-property name="transportType" type="java.lang.String">CLIENT</config-property>
<!-- define security domain -->
<security-domain-and-application>JmsXARealm</security-domain-and-application>
</tx-connection-factory>
<connection-factories>
<mbean code="org.jboss.resource.deployment.AdminObject"
name="jca.wmq:name=ivtqueue">
<!-- Bind this AdminObject with the JNDI name IVTQueue -->
<attribute name="JNDIName">jms/jabsQUEUE_1</attribute>
<!-- this MBean depends on the WebSphere MQ resource adapter -->
<depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
<!-- this admin object is a javax.jms.Queue -->
<attribute name="Type">javax.jms.Queue</attribute>
<!--
Configuration for Queue TEST.QUEUE on queue manager ExampleQM. All messages sent
to this queue will have their expiry time overridden so that messages never expire
-->
<attribute name="Properties">
baseQueueManagerName=JABS
baseQueueName=JABS.TESTQ
expiry=EXP_UNLIMITED
</attribute>
</mbean>
</connection-factories>
</connection-factories>
*But i don't know if it is completely correct.*
*Is there anyone that can help me??*
*Thanks in advance.*
*Andrea*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582069#582069]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[jBPM] - Problem with hibernate entity and variable
by Jaber C. Mourad
Jaber C. Mourad [http://community.jboss.org/people/newbeewan] created the discussion
"Problem with hibernate entity and variable"
To view the discussion, visit: http://community.jboss.org/message/582358#582358
--------------------------------------------------------------
Hi,
I encoutered a trouble with hibernate entity stored into a process variable in jbpm 4.4...
I've got every time a lazy loading error for any property of a very simple entity :
@Entity
@Table(name = "DAY_OFF_TYPE")
public class DayOffType extends AbstractEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Long id;
@Column(name = "KEY_LABEL", nullable = false)
private String keyLabel;
@Column(name = "PDF_TYPE", nullable = true)
private String pdfType;
@Column(name= "AVAILABILITY")
@Enumerated(EnumType.STRING)
private TypeOfAvailability availability;
public void setAvailability(TypeOfAvailability availability) {
this.availability = availability;
}
public TypeOfAvailability getAvailability() {
return availability;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getKeyLabel() {
return keyLabel;
}
public void setKeyLabel(String keyLabel) {
this.keyLabel = keyLabel;
}
public String getPdfType() {
return pdfType;
}
public void setPdfType(String pdfType) {
this.pdfType = pdfType;
}
}
I lod that entity for a DAO, put it in a process variable, and trying to acces to it during an other task, and I've got an Exception when I'm trying to access to any property :
[ERROR] org.hibernate.LazyInitializationException 42 - could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
at mypackage.data.DayOffType_$$_javassist_13.getId(DayOffType_$$_javassist_13.java)
at mypackage.process.vacancy.VacancyProcessTest.testProcess(VacancyProcessTest.java:100)
Any idea to solve that issue ?
Regards
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582358#582358]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[jBPM] - jBPM3 with JPA2 (+Spring3, JBoss 4.2.3)
by Maciej Zerkowski
Maciej Zerkowski [http://community.jboss.org/people/zerkowski.maciek] created the discussion
"jBPM3 with JPA2 (+Spring3, JBoss 4.2.3)"
To view the discussion, visit: http://community.jboss.org/message/582327#582327
--------------------------------------------------------------
<! --http://community.jboss.org/message/582327#582327 jBPM3 with JPA2 (+Spring3, JBoss 4.2.3)><xml> <o:OfficeDocumentSettings> <o:RelyOnVML /> <o:AllowPNG /> <o:DoNotRelyOnCSS /> </o:OfficeDocumentSettings> </xml><![endif]--><! --http://community.jboss.org/message/582327#582327 jBPM3 with JPA2 (+Spring3, JBoss 4.2.3)><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:UseFELayout /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><! --http://community.jboss.org/message/582327#582327 jBPM3 with JPA2 (+Spring3, JBoss 4.2.3)><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><! --http://community.jboss.org/message/582327#582327 jBPM3 with JPA2 (+Spring3, JBoss 4.2.3)> <mce:style><! /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} ></mce:style><mce:style _mce_bogus="1"><!-->
-->
<! --http://community.jboss.org/message/582327#582327 jBPM3 with JPA2 (+Spring3, JBoss 4.2.3)-->
Hello all!
I have a question regarding configuration jBPM 3.2.6.SP1 with JPA2 (Hibernate implementation). I am new in jBPM and I would like to ask you how can I do that in a proper way? You can find my configuration bellow.
What I would also like to know is – what in your opinion is the best approach to integrate jBPM with the web application (like in my case) - to integrate my persistent classes with the jBPM persistent classes and have one entity manager factory (hibernate session factory) or to use two data sources and synchronize transactions somehow.
Can you give me some examples or links or maybe you have some tips or suggestions what is the best way (and how) to do this?
I appreciate any help.
Regards,
Maciek
my *applicationContext.xml:*
<bean id="dataSource" class="org.springframework.
jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/db" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="database">...</prop>
...
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
my *persistence.xml:*
<persistence-unit name="persistenceUnit" transaction-type="RESOURCE_LOCAL">
<class>com.myDVDStore...</class>
...
</persistence-unit>
my
*<span style="color: #333333;">jbpm.cfg.xml:</span>*
<jbpm-context>
<service name="authentication"
factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory"
/>
<service name="logging"
factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="persistence">
<factory>
<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory"> // I probably need to extend this to put my service there?
<field name="isTransactionEnabled">
<false />
</field>
</bean>
</factory>
</service>
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="scheduler"
factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
</jbpm-context>
<bean id="dataSource" class="org.springframework.
jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/db" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="persistenceXmlLocation"
value="classpath:META-INF/persistence.xml" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="database">...</prop>
...
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
my persistence.xml:
<persistence-unit name="persistenceUnit" transaction-type="RESOURCE_LOCAL">
<class>...</class>
...
</persistence-unit>
my jbpm.cfg.xml
<jbpm-context>
<service name="authentication"
factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory"
/>
<service name="logging"
factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="persistence">
<factory>
<bean class="com.myapp.JpaDbPersistenceServiceFactory"> // I
probably need to extend this to put my service there?
<field name="isTransactionEnabled">
<false />
</field>
</bean>
</factory>
</service>
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="scheduler"
factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
</jbpm-context>
<tx:annotation-driven transaction-manager="transactionManager" />
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582327#582327]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months