[JBoss JIRA] Created: (JBPM-821) ProcessClassLoader.getResourceAsStream throws JbpmException when the resource is not found in DB
by V?ctor Su?rez (JIRA)
ProcessClassLoader.getResourceAsStream throws JbpmException when the resource is not found in DB
------------------------------------------------------------------------------------------------
Key: JBPM-821
URL: http://jira.jboss.com/jira/browse/JBPM-821
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.1.2
Reporter: V?ctor Su?rez
Assigned To: Tom Baeyens
"ProcessClassLoader.getResourceAsStream(String name)" must return null when the resource is not found <link>http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassLoader.html#getRes...</link>.
But when the resource look up must be performed in the DB, if that resource is not found I get a JbpmException.
"ProcessClassLoader.getResourceAsStream(String name)" delegates in "fileDefinition.getBytes(name)" for searching the resource, and this calls to "getBytesFromDb(name)", and finally, this calls to "getByteArray(name)", that performs this code:
if (byteArray == null) {
throw new JbpmException("file '" + name + "' not found in db");
}
I think that a possible solution could be:
byte[] getBytesFromDb(String name) {
byte[] bytes;
//refactored this line
ByteArray byteArray = doGetByteArray(name);
bytes = byteArray.getBytes();
return bytes;
}
ByteArray getByteArray(String name) {
//extract method refactoring
ByteArray byteArray = doGetByteArray(name);
if (byteArray == null) {
throw new JbpmException("file '" + name + "' not found in db");
}
return byteArray;
}
//extracted method
ByteArray doGetByteArray(String name) {
ByteArray byteArray = (ByteArray) (processFiles != null ? processFiles.get(name) : null);
return byteArray;
}
I let with no modifications "getByteArray(String name)" because is referenced in the rest of code.
Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months
[JBoss JIRA] Created: (JGRP-347) TCP bundling with FLUSH not working
by Bela Ban (JIRA)
TCP bundling with FLUSH not working
-----------------------------------
Key: JGRP-347
URL: http://jira.jboss.com/jira/browse/JGRP-347
Project: JGroups
Issue Type: Bug
Affects Versions: 2.3 SP1
Reporter: Bela Ban
Assigned To: Bela Ban
Fix For: 2.4
We can make TCP with bundling *on* work (timeout 0) if we exchange order
of passUp/passDown of the view for a new member in Gms line 509. Since
bundler is sending messages in bundles it screws up synchronous step
process required for a new member when doing START_FLUSH, view
installation, STOP_FLUSH. We have a thread race here on line 509. In
order to circumvent that we can *first* pass a view from a join response
up to FLUSH and then pass it down. I am not sure how this affects other
tests.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months
[JBoss JIRA] Created: (EJBTHREE-823) Unable to call ejb remotely
by Sureshbabu Thyvalappil (JIRA)
Unable to call ejb remotely
---------------------------
Key: EJBTHREE-823
URL: http://jira.jboss.com/jira/browse/EJBTHREE-823
Project: EJB 3.0
Issue Type: Bug
Environment: JBOSS 4.0.5 with EJB 3.0
Reporter: Sureshbabu Thyvalappil
I'm using JBOSS 4.0.5GA with ejb3. I am running into weird behavior when running java client from remote machine. If I run it from the same machine where the jboss server is running, no problem. So here is the behavior I'm noticing.
FOr the jndi lookup of ejb, it is connecting the remote server and gets a reference to the ejb. But when I call a method on the ejb reference, it is trying to call a method on the local machine( I mean the same machine where the client is running).
Sounds very weird to me. Any help is appreciated from EJB3 experts.
I upgraded to EJB3 RC9 patch1, but same behavior.
Here is the client code ..
try
{
Properties p=new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL,"jnp://remote-host:1099");
InitialContext ctx = new InitialContext(p);
IReportService report = (IReportService) ctx.lookup(
"ejb3/xxx/ReportService");
System.out.println("Got the ejb remote reference = "+report);
System.out.println("report.resubmit.."+report.resubmit(null,0L));
ReportJob reportJob = new ReportJob();
System.out.println("B4 report.submitRequest..");
report.submitRequest(reportJob);
System.out.println("After report.submitRequest..");
}
catch (Exception e)
{
e.printStackTrace();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months
[JBoss JIRA] Created: (HIBERNATE-55) No way to specify Connection Release Mode in HMBean
by Mohammed Sadiq (JIRA)
No way to specify Connection Release Mode in HMBean
---------------------------------------------------
Key: HIBERNATE-55
URL: http://jira.jboss.com/jira/browse/HIBERNATE-55
Project: Hibernate
Issue Type: Feature Request
Reporter: Mohammed Sadiq
Assigned To: Steve Ebersole
In my application I have employed an Hibernate MBean for session factory creation and binding it to JNDI and I've added a new overload for the SessionFactory.openSession(Interceptor, ConnectionReleaseMode) method to oveeride the default connection release mode.
The default connection release mode for any Hibernate session created using the session factory deployed through a Hibernate MBean configuration is taken as "after_statement".
It will be more helpful, if there exists an MBean attribute "ConnectionReleaseMode" which can thake the enumerated values from the org.hibernate.ConnectionReleaseMode.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months