[EJB 3.0] New message: "Performance JAS 5.1.0.GA with Security enabled"
by max mueller
User development,
A new message was posted in the thread "Performance JAS 5.1.0.GA with Security enabled":
http://community.jboss.org/message/530983#530983
Author : max mueller
Profile : http://community.jboss.org/people/maxMueller
Message:
--------------------------------------------------------------
Hi,
we have the following problem. After update from jboss4.2.3 to jboss5.1.0 performance is very bad. We use EJB3 with SSB and JPA Entities.
After a debugging/logging session i think the security is the problem.
Following test:
######################################################################
@TransactionAttribute(TransactionAttributeType.REQUIRED)
@SecurityDomain("EVIJET")
@TransactionManagement(TransactionManagementType.CONTAINER)
@PermitAll
@Stateless
public class TC2 implements TC2Local
{
/**
* Default constructor.
*/
public TC2()
{
// TODO Auto-generated constructor stub
}
public String ping()
{
return "ping";
}
}
######################################################################
@TransactionAttribute(TransactionAttributeType.REQUIRED)
@TransactionManagement(TransactionManagementType.CONTAINER)
@Stateless
public class SSBNoSecurity implements SSBNoSecurityLocal, SSBNoSecurityRemote
{
@Resource
private SessionContext ctx;
/**
* Default constructor.
*/
public SSBNoSecurity()
{
// TODO Auto-generated constructor stub
}
public String ping()
{
return "ping";
}
}
#############################################################################
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530983#530983
16 years, 2 months
[EJB 3.0] New message: "Re: howto setup jpa using oracle 10g unicode nvarchar2"
by jaikiran pai
User development,
A new message was posted in the thread "howto setup jpa using oracle 10g unicode nvarchar2":
http://community.jboss.org/message/530981#530981
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
A couple of other options you could try:
1) Try setting this in the -ds.xml:
<connection-property name = "oracle.jdbc.defaultNChar">true</connection-property>
I am not sure whether that will work (I have seen some other users complain that it doesn't work)
2) Pass the oracle.jdbc.defaultNChar as a Java System property through your run.conf (or run.bat for Windows)
-Doracle.jdbc.defaultNChar=true
Add that to the JAVA_OPTS section
P.S: Make sure that you are using the correct Oracle JDBC driver version. From what found in a google search, Oracle 10 driver is required for this property to be recognized.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530981#530981
16 years, 2 months
[EJB 3.0 Development] New message: "Re: Lookup to java:comp/EJBContext during postconstruction"
by jaikiran pai
User development,
A new message was posted in the thread "Lookup to java:comp/EJBContext during postconstruction":
http://community.jboss.org/message/530970#530970
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
> jaikiran wrote:
> And i don't think it's specific to the EJBContext. I guess it will fail for anything under java:comp for that bean. Can you give a quick try by looking up something else under java:comp from within the @Postconstruct of MDB?
Looked at that stacktrace again and it indeed appears to be specific to java:comp/EJBContext
Caused by: java.lang.NullPointerException
at org.jboss.ejb3.EJBContextFactory.getObjectInstance(EJBContextFactory.java:57)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1483)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1500)
It appears that the AbstractPool invokes the postconstruct after popping the context from the thread local stack:
protected BeanContext<?> create(Class[] initTypes, Object[] initValues)
{
BeanContext ctx;
ctx = createBeanContext();
container.pushContext(ctx);
try
{
container.injectBeanContext(ctx);
ctx.initialiseInterceptorInstances();
}
finally
{
container.popContext();
}
container.invokePostConstruct(ctx, initValues);
// the init method only applies to stateful session beans
++createCount;
return ctx;
}
The fix looks simple enough. I'll file a JIRA for this.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530970#530970
16 years, 2 months
[jBPM] New message: "Re: Generate Image from ProcessDefinition"
by Sriraman Gopalan
User development,
A new message was posted in the thread "Generate Image from ProcessDefinition":
http://community.jboss.org/message/530961#530961
Author : Sriraman Gopalan
Profile : http://community.jboss.org/people/sreeraaman
Message:
--------------------------------------------------------------
Hi All,
I am not sure if this is what you are looking at. Assuming that you designed the process using the GPD eclipse plugin, after deployment of the process (.par archive), you can get the image of the process as a byte[] as shown below:
public byte[] getProcessDiagram(Long processDefinitionId) {
byte[] returnValue = null;
JbpmContext context = getJbpmContext();
try{
GraphSession graphSession = context.getGraphSession();
ProcessDefinition processDefinition = graphSession.getProcessDefinition(processDefinitionId);
FileDefinition fileDefinition = processDefinition.getFileDefinition();
returnValue = fileDefinition.getBytes("processimage.jpg");
}
catch(Exception e){
e.printStackTrace();
}
finally{
context.close();
}
return returnValue;
}
Form the returning byte[] you can manipulate the image as desired. This is as of JBPM 3.2.3.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530961#530961
16 years, 2 months