[jBPM Development] New message: "Re: No public metadata API?"
by Sebastian Schneider
User development,
A new message was posted in the thread "No public metadata API?":
http://community.jboss.org/message/524949#524949
Author : Sebastian Schneider
Profile : http://community.jboss.org/people/sebastian.s
Message:
--------------------------------------------------------------
Are you using jBPM 4.3 or jBPM 3.2? In jBPM 4.3 there is the ExecutionService. Using it you can retrieve process instances by their ids:
{code}
ProcessInstance processInstance = executionService.findProcessInstanceById(processInstanceId);
{/code}
Afterwards you can use the following methods to retrieve some of the information you wanted:
{code}
processInstance.findActiveActivityNames();
processInstance.getState();
processInstance.getProcessDefinitionId():
..
{/code}
HTH. If you could be a bit more specific on the data you want to retrieve we would be able to help more. Maybe it's something which is not possible through the API right now but would make sense and thus be useful to others, too. In this case: why not fill a JIRA issue after discussion?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524949#524949
16 years, 5 months
[JBoss Cache] New message: "Re: Making JBoss cache work with Hibernate 3.3.1, JBoss AS 4.2.3 and Spring 2.5.x"
by Bibhash Roy
User development,
A new message was posted in the thread "Making JBoss cache work with Hibernate 3.3.1,JBoss AS 4.2.3 and Spring 2.5.x":
http://community.jboss.org/message/524939#524939
Author : Bibhash Roy
Profile : http://community.jboss.org/people/bibroy1
Message:
--------------------------------------------------------------
hibernate.cache.provider_class=
org.hibernate.cache.TreeCacheProvider
hibernate.cache.provider_configuration_file_resource_path=
config/jboss-cache-1.4.1-sp13.xml
hibernate.transaction.factory_class=
org.hibernate.transaction.JTATransactionFactory
I have set the above properties and I am working with JBoss cache 1.4.1.SP9, Hibernate 3.3..1, JBoss AS 4.2.3 and Spring 2.5.6 ...however I am getting the following exception..........PLEASE HELP!!!
java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.naming.internal.VersionHelper12.getContextClassLoader(VersionHelper12.java:158)
at com.sun.naming.internal.ResourceManager.getFactory(ResourceManager.java:339)
at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:575)
at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:162)
at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524939#524939
16 years, 5 months
[JBoss Tools] New message: "Hibernate tools provides Hibernate statistics in Eclipse?"
by Arbi Sookazian
User development,
A new message was posted in the thread "Hibernate tools provides Hibernate statistics in Eclipse?":
http://community.jboss.org/message/524938#524938
Author : Arbi Sookazian
Profile : http://community.jboss.org/people/asookazian
Message:
--------------------------------------------------------------
Does Hibernate tools provide Hibernate statistics in Eclipse (perhaps in the Hibernate console)?
I am currently using a JMX MBean to get dynamic data on Hibernate statistics for my EntityManager.
@Name("hibernateUtils")
@AutoCreate
public class HibernateUtils {
@In EntityManager entityManager;
public Statistics getStatistics() {
return ((HibernateSessionProxy)entityManager.getDelegate()).getSessionFactory().getStatistics();
}
public SessionFactory getSessionFactory() {
return ((HibernateSessionProxy)entityManager.getDelegate()).getSessionFactory();
}
}
@Name("jmxHibernateStatistics")
@AutoCreate
public class JmxHibernateStatistics {
@In HibernateUtils hibernateUtils;
@Logger Log log;
public void installHibernateMBean() {
Statistics stats = hibernateUtils.getStatistics();
stats.logSummary();
log.info("new Date(stats.getStartTime()) = "+new Date(stats.getStartTime()));
String[] myQueries = stats.getQueries();
for(int i = 0; i < myQueries.length; i++){
log.info("myQueries["+i+"]: "+myQueries[i]);
}
//get your SF
SessionFactory sf = hibernateUtils.getSessionFactory();
//get the available MBean servers
List list = MBeanServerFactory.findMBeanServer(null);
//take the first one
MBeanServer server = (MBeanServer) list.get(0);
//build the MBean name
ObjectName on = null;
try{
on = new ObjectName("Hibernate:type=statistics,application=sample");
}
catch(MalformedObjectNameException e){
log.error(e);
}
StatisticsService mBean = new StatisticsService();
mBean.setSessionFactory(sf);
try {
server.registerMBean(mBean, on);
} catch (InstanceAlreadyExistsException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MBeanRegistrationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotCompliantMBeanException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//WARNING:
/*
* When the SessionFactory is closed, we need to unregister the MBean
//get the available MBean servers
ArrayList list = MBeanServerFactory.findMBeanServer(null);
//take the first one
MBeanServer server = (MBeanServer) list.get(0);
server.unregisterMBean(on);
You can add this code to you HibernateUtil like class.
*/
}
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524938#524938
16 years, 5 months
[Datasource Configuration] New message: "Re: How to configure Oracle with my application in jboss 5.0"
by Anand Kumar
User development,
A new message was posted in the thread "How to configure Oracle with my application in jboss 5.0":
http://community.jboss.org/message/524935#524935
Author : Anand Kumar
Profile : http://community.jboss.org/people/akstifr
Message:
--------------------------------------------------------------
Thank you for your reply
I have gone through that document and tried to install it but i have been facing problems :
While install jboss i did not specify any Database for use and it took by default Hypersonic database and configured it.
But now i want to configure Oracle database to Jboss. So i have created a file called Oracle-ds.xml as specified in the above document and try to start the server again but it did not start up and raised number of errors that are related to database oracle.
Now i want to change this configuration from Hypersonic to Oracle database. So what are the files that i have to change in order to configure to Oracle?
I have tried to modify the file hsqldb-ds.xml but it was of no use at all.
Please provide me more help in this regard..
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524935#524935
16 years, 5 months
Query
by Brajesh Patel
Hello all,
How to start study for jboss .
--
Thanks
Brajesh Patel
16 years, 5 months
[Beginner's Corner] New message: "Re: Can't use CRUD in JBoss Developer Studio"
by Robert Freund
User development,
A new message was posted in the thread "Can't use CRUD in JBoss Developer Studio":
http://community.jboss.org/message/524922#524922
Author : Robert Freund
Profile : http://community.jboss.org/people/rbrtfreund
Message:
--------------------------------------------------------------
sounds like wrong db or persistence not being loaded.
If using Studio to generate project click edit in initial wizard and go to driver properties and make sure those are in fact your db. Make sure when deploying app that you see it found in the hibernate log.
If using JBoss 5 make sure you are retrieving your entityManagerFactory from JNDI.
persistence.xml
<property name="jboss.entity.manager.factory.jndi.name" value="java:/myEntityManagerFactory"/>
components.xml
<transaction:entity-transaction entity-manager="#{em}"/>
<persistence:entity-manager-factory name="myDatabase" installed="@loadPersistenceUnits@"/>
<persistence:managed-persistence-context name="em" auto-create="true"
entity-manager-factory="#{myDatabase}" persistence-unit-jndi-name="java:/myEntityManagerFactory"/>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524922#524922
16 years, 5 months
[jBPM] New message: "Re: Upgrade from JBPM3 to JBPM4 woes"
by nick bauman
User development,
A new message was posted in the thread "Upgrade from JBPM3 to JBPM4 woes":
http://community.jboss.org/message/524917#524917
Author : nick bauman
Profile : http://community.jboss.org/people/nick.bauman
Message:
--------------------------------------------------------------
Ronald,
This is great information. I really appreciate your taking the time to go into this point by point. A true mark of craftsmaship and a passion for understanding other people's system problems.
When we do finally migrate, I will certainly be starting with the process conversion tool and i'll contribute it back.
I'm fully aware of http://www.inze.be/andries/author/admin/'s information on Spring integration with v4. I think I have a copy of it etched into my brain by now. What's left of it
Yes, 5 and 1 does contradict! Sometimes the greatest strength is the greatest weakness at the same time. I'm not trying to be obtuse or mystical by saying that, either. I'm sincere: great tools embrace a philosophy or world-view. If you're not ready to "change your mind", maybe you shouldn't be using the tool!
If you have any more questions or want to assign any "homework", I'll try and see what I can do.
Cheers,
Nick
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524917#524917
16 years, 5 months