[jBPM] New message: "using GWT console with jBPM-3 schema"
by kurt steele
User development,
A new message was posted in the thread "using GWT console with jBPM-3 schema":
http://community.jboss.org/message/523904#523904
Author : kurt steele
Profile : http://community.jboss.org/people/arcticranger
Message:
--------------------------------------------------------------
My company is using JBoss ESB 4.5. That means for jBPM we are restricted to the schema used by the service version of jBPM*, jbpm.esb*.
The schema used by *jbpm.esb* is equivalent to the schema in jBPM 3.1.1, so we were able to install jBPM 3.1.1 separately and have its GWT console use the *jbpm.esb* tables. It's pretty but quite limited. I've heard it referred to as a prototype and I think it was the first introduction of the GWT console to jBPM.
Is there a more advanced GWT console that will work against the 3.1.1 schema?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523904#523904
16 years, 2 months
[JBoss Portal] New message: "Re: Page not found goes to JBoss Portal"
by Kevin Johnson
User development,
A new message was posted in the thread "Page not found goes to JBoss Portal":
http://community.jboss.org/message/523902#523902
Author : Kevin Johnson
Profile : http://community.jboss.org/people/klj62
Message:
--------------------------------------------------------------
We already have a custom portal, and navigation to the default URI (something like http://server/portal) goes directly to our login screen. But once logged in, entering an invalid URL in the browser's address line will forward to the JBoss Portal. We want 404 errors to go to our custom portal's default page, not to JBoss.
Is it possible that something was not defined properly, and our portal isn't really the "default"? I was not the initial developer, so I'm not sure what to check to verify it. I do know that the method of redirecting to our login page is done by adding (or modifying) the login-config element to the jboss-portal.sar/portal-server.war/WEB-INF/web.xml.
Kevin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523902#523902
16 years, 2 months
[jBPM] New message: "Accessing jBPM Hibernate Session in Activity"
by Kai Weingärtner
User development,
A new message was posted in the thread "Accessing jBPM Hibernate Session in Activity":
http://community.jboss.org/message/523899#523899
Author : Kai Weingärtner
Profile : http://community.jboss.org/people/KaiWeing
Message:
--------------------------------------------------------------
Hello,
I'm looking for a best practice for the following use case:
(I use jBPM 4.3 and I'm running in a web container, so no JTA, etc.)
At one stage in my process, I want to grab a variable (transfer object, serializable) from the process context, convert it to an entity and write it to the database. I want to do this in the same transaction that is used by jBPM, so my writing to the db and advancing the process are atomar.
Since no JTA is available my activity/dao needs access to the hibernate session used by jBPM. I currently handle this by passing the SessionFactory I get from the environment to the process as a process variable. The activity/dao can then access this session factory to retrieve the current session.
(I added my entity mapping to the jbpm.hibernate.cfg.xml)
SessionFactory sessionFactory = processEngine.get(SessionFactory.class);
sessionFactory.getCurrentSession().beginTransaction();
Map<String, Object> vars = new HashMap<String, Object>();
AuftragTO auftrag = new AuftragTO();
auftrag.setName("myname");
vars.put("auftrag", auftrag );
vars.put("sessionFactory", sessionFactory);
try {
ProcessInstance processInstance = executionService.startProcessInstanceByKey("simple", vars );
sessionFactory.getCurrentSession().getTransaction().commit();
} catch (RuntimeException e) {
sessionFactory.getCurrentSession().getTransaction().rollback();
}
This stops working as soon as anything is executed asynchronously (the current session no longer has an open tx, as it is closed when the sync part finishes, the async activity seems to use another session factory).
Is there a better way to access the jBPM session factory from an activity? EventHandler or ActivityBehaviour don't seem to offer that.
Is there another way to participate in the jBPM transaction?
Thanks for your help!
Kai
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523899#523899
16 years, 2 months
[Javassist] New message: "Re: what happened to $r?"
by Arvind K
User development,
A new message was posted in the thread "what happened to $r?":
http://community.jboss.org/message/523896#523896
Author : Arvind K
Profile : http://community.jboss.org/people/megalodon
Message:
--------------------------------------------------------------
Just for the record, I'd like to take a whack at this one.
Someone can correct me if I am wrong (which might be rare, judging by the activity in this forum) but there are 2 errors in my opinion:
1.) You are using a local variable 'x' without adding the local variable first using addlocalvariable() function.
2.) $r is not available to code added using insertBefore() function. Switching insertBefore() call to insertAfter() call should resolve this bug.
-Arvind
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523896#523896
16 years, 2 months
[Javassist] New message: "Re: what happened to $r?"
by Arvind K
User development,
A new message was posted in the thread "what happened to $r?":
http://community.jboss.org/message/523895#523895
Author : Arvind K
Profile : http://community.jboss.org/people/megalodon
Message:
--------------------------------------------------------------
Just for the record, I'd like to take a whack at this one.
Someone can correct me if I am wrong (which might be rare looking at the activity in this forum) but there are 2 errors in my opinion:
1.) You are using a local variable 'x' without adding the local variable first using addlocalvariable() function.
2.) $r is not available to code added using insertBefore() function. Switching insertBefore() call to insertAfter() call should resolve this bug.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523895#523895
16 years, 2 months
[JNDI and Naming] New message: "Re: Context Lookup vs. Injection"
by jaikiran pai
User development,
A new message was posted in the thread "Context Lookup vs. Injection":
http://community.jboss.org/message/523890#523890
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
Sorry, forgot about this discussion.
> mailto:andy.miller@jboss.com wrote:
>
> I tried that, but it didn't work. Just get a NullPointerException when I try to reference the factory. Specifically, the following wiki shows how to do it the old way:
>
> http://community.jboss.org/docs/DOC-11223
>
>
I tried this today and it worked fine for me. Here's the EJB3 SLSB into which i am injecting this as a @Resource:
public interface KeyGenerator
{
Object generateKey();
}
@Stateless
@Remote(KeyGenerator.class)
@RemoteBinding(jndiBinding = SimpleSLSB.JNDI_NAME)
public class SimpleSLSB implements KeyGenerator
{
public static final String JNDI_NAME = "KeyGeneratorFactoryInjectionTestBean";
@Resource (mappedName="UUIDKeyGeneratorFactory")
private KeyGeneratorFactory keygenFactory;
public Object generateKey()
{
if (this.keygenFactory == null)
{
throw new RuntimeException("Key generator factory was not injected");
}
try
{
return this.keygenFactory.getKeyGenerator().generateKey();
}
catch (Exception e)
{
throw new RuntimeException("Could not generate key: ", e);
}
}
}
And then a testcase which invokes on this bean, which then internally uses the keygenfactory to create a keygen and then the key:
public class KeyGeneratorFactoryInjectionTestCase extends JBossTestCase
{
private static Logger logger = Logger.getLogger(KeyGeneratorFactoryInjectionTestCase.class);
public KeyGeneratorFactoryInjectionTestCase(String name)
{
super(name);
}
public static Test suite() throws Exception
{
return getDeploySetup(KeyGeneratorFactoryInjectionTestCase.class, "keygenfactory-injection.jar");
}
public void testKeyGeneration() throws Exception
{
KeyGenerator keyGenerator = (KeyGenerator) this.getInitialContext().lookup(SimpleSLSB.JNDI_NAME);
Object key = keyGenerator.generateKey();
logger.info("Generated key: " + key);
assertNotNull("Key generator generated a null key", key);
}
}
Passes:
[junit] Running org.jboss.test.ejb3.keygenfactory.injection.unit.KeyGeneratorFactoryInjectionTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.178 sec
And here's the generated key:
2010-02-03 18:31:59,388 INFO [org.jboss.test.ejb3.keygenfactory.injection.unit.KeyGeneratorFactoryInjectionTestCase] Generated key: 93EC42DA7F00000101C47F7C5549F6EB
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523890#523890
16 years, 2 months