[JNDI and Naming] - What does "Naming context is read-only" mean?
by Manabu Yoneyama
Manabu Yoneyama [http://community.jboss.org/people/amadablam] created the discussion
"What does "Naming context is read-only" mean?"
To view the discussion, visit: http://community.jboss.org/message/627906#627906
--------------------------------------------------------------
I'd like to run a simple web application with Hibernate4 on a JBoss AS7.
But I have an error below.
java.lang.UnsupportedOperationException: Naming context is read-only
I wrote hibernate.cfg.xml (snippet),
<session-factory name="">
<property name="connection.datasource">java:jboss/datasources/MySQL</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
</sessioin-factory>
and source code:
Configuration config = new Configuration().configure();
SessionFactory sessionFactory = config.buildSessionFactory(); // It might be causes the error.
I can connect datasouce "java:jboss/datasources/MySQL" use below code.
InitialContext context = new InitialContext();
ds = (DataSource)context.lookup("java:jboss/datasources/MySQL");
conn = ds.getConnection();
Does anyone know the reason for this?
Sorry for my english is poor.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/627906#627906]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[jBPM] - reuse StatefulKnowledgeSession, is StatefulKnowledgeSession lightweight
by Nick Tan
Nick Tan [http://community.jboss.org/people/missedone] created the discussion
"reuse StatefulKnowledgeSession, is StatefulKnowledgeSession lightweight"
To view the discussion, visit: http://community.jboss.org/message/628462#628462
--------------------------------------------------------------
hi, folks
i'm using jBPM5 and here is question about how to effectively use the StatefulKnowledgeSession.
is StatefulKnowledgeSession lightweight?
is there any potential risk if we implement the strategy that create StatefulKnowledgeSession for each request, that means, create StatefulKnowledgeSession when every time call startProcess, and dispose it after the process instance complete.
I read the javadoc of StatefulKnowledgeSession, it clear state that: "
After the application finishes using the session, though, it *must* call the dispose() method in order to free the resources and used memory.
"
at this monment, what i can image is that, if there are lots of active process instance not complete, that will cause lots of StatefulKnowledgeSession resources not released, which could be potential memory leak? is this correct?
do you guys have any best practice or pattern of useing StatefulKnowledgeSession? for example, options like:
reuse single StatefulKnowledgeSession?
reuse StatefulKnowledgeSession in a pool?
oneStatefulKnowledgeSession per request?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/628462#628462]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[JBoss Tools] - Project archive view no war option
by batwishper
batwishper [http://community.jboss.org/people/batwishper] created the discussion
"Project archive view no war option"
To view the discussion, visit: http://community.jboss.org/message/629110#629110
--------------------------------------------------------------
I'm currently developing an gwt application using EJBs. My EJBs works fine on JBoss, no problem.
However, I'm now arrived to a point where I need gwt to be run on jboss as well in order to call the ejbs.
I found this : http://community.jboss.org/docs/DOC-15593 http://community.jboss.org/wiki/UseJBossToolsWithGoogleGWTPlugin
I installed it, no problem at all. The problem came with the "create a war" part.
I have installed JBoss Tool, and get the "Project archives" view, but no matter what, i don't have the war option in "new archive".
The only thing I get is "jar" ...
I look on the internet, but I haven't be able to find a solution.
I found this : http://docs.redhat.com/docs/en-US/JBoss_Developer_Studio/3.0/html/JBoss_S... http://docs.redhat.com/docs/en-US/JBoss_Developer_Studio/3.0/html/JBoss_S...
and the note :
If you see only JAR from the list of available archive types, you should verify whether AS Tools plugins/features are in place. EAR, EJB JAR and WAR options are contributed by the AS Tools independently from webtools and the virtual project model. Thus, without them only JAR will show up.
And i simply don't understand what I need to do.
Can anyone explain it please ?
Thanks !
Configuration :
Ubuntu Linux 10.10
Eclipse JEE 3.6 (Helios)
JBoss 6
SDK GWT 2.4
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/629110#629110]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[jBPM] - Can Human Task component work with JTA
by Patrick Yang
Patrick Yang [http://community.jboss.org/people/patrickyang] created the discussion
"Can Human Task component work with JTA"
To view the discussion, visit: http://community.jboss.org/message/621185#621185
--------------------------------------------------------------
Hi Krisv,
I am trying to control JBPM5 Process Engine / Human Task / Histroy Log / My own application in one atomic transaction using JTA.
Currently I already configured Process Engine / Histroy Log / My own application with JTA (BTM implemenation), but failed to include Human Task in.
It will always report "A JTA EntityManager cannot use getTransaction()" exception, I tracked the source code, it was because, below code always call getTransaction, and it was not allowed when we config Human Task persistence unit as JTA.
Can you give me some suggestion?
Thanks
private void doOperationInTransaction(final TransactedOperation operation) {
final EntityTransaction tx = em.getTransaction();
try {
if (!tx.isActive()) {
tx.begin();
}
operation.doOperation();
tx.commit();
} finally {
if (tx.isActive()) {
tx.rollback();
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621185#621185]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months