Re: [jboss-user] [EJB 3.0] - deploying two diff versions of same EJB in two diff EARs
by Wolfgang Knauf
Wolfgang Knauf [http://community.jboss.org/people/WolfgangKnauf] replied to the discussion
"deploying two diff versions of same EJB in two diff EARs"
To view the discussion, visit: http://community.jboss.org/message/545152#545152
--------------------------------------------------------------
Hi,
I think this should be possible. In the following snippets, I assume that you use EJB3.
Step 1:in your EJB jar, you can define the global JNDI names of your beans.
Either use annotations ("org.jboss.ejb3.annotation.RemoteBinding") on the bean class, or use a "jboss.xml" file:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd"><jboss> <enterprise-beans> <session> <ejb-name>MyBean</ejb-name> <jndi-name>MyRemoteName</jndi-name> <local-jndi-name>MyLocalName</local-jndi-name> </session> </enterprise-beans></jboss>
Step 2: in your client project, use a "jboss-web.xml" (for web client) or "jboss-client.xml" (for app client) and the ENC to map a ejb reference to this global name. Here is a snippet for a "jboss-web.xml":
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd"><jboss-web> ... <ejb-ref> <ejb-ref-name>ejb/MyRemoteEjbRef</ejb-ref-name> <jndi-name>MyRemoteName</jndi-name> </ejb-ref> <ejb-local-ref> <ejb-ref-name>ejb/MyLocalRef</ejb-ref-name> <local-jndi-name>MyLocalName</local-jndi-name> </ejb-local-ref></jboss-web>
Of course, you have to declare those Environment Naming Context (ENC) entries also in "web.xml" or "application-client.xml"
Hope this helps
Wolfgang
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/545152#545152]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 7 months
Re: [jboss-user] [jBPM] - Error sending email in jbpm-4.2
by carlos mauricio jaramillo henao
carlos mauricio jaramillo henao [http://community.jboss.org/people/cmjhingeniero] replied to the discussion
"Error sending email in jbpm-4.2"
To view the discussion, visit: http://community.jboss.org/message/545145#545145
--------------------------------------------------------------
I could not solve the problem, so I consulted the web is in the configuration of tomcat. If anyone can help me I appreciate it. I tried sending email from a normal java method and I get the following error:
javax.mail.NoSuchProviderException: smtp
Source Code Java:
public void send(){
MimeMultipart multipart = new MimeMultipart();
Properties properties = new Properties();
properties.put("mail.smtp.host", "10.1.1.20");
Session session = Session.getDefaultInstance(properties, null);
session.setDebug(true);
try {
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(" mailto:carlosj@audifarma.com.co carlosj(a)audifarma.com.co"));
msg.setRecipients(Message.RecipientType.TO, " mailto:cmjhingeniero@yahoo.es cmjhingeniero(a)yahoo.es");
msg.setSubject("PROBANDO");
msg.setSentDate(new Date());
MimeBodyPart mbp = new MimeBodyPart();
mbp.setText("PROBANDO");
multipart.addBodyPart(mbp);
msg.setContent(multipart);
Transport t = session.getTransport("smtp");
t.connect();
Transport.send(msg);
t.close();
System.out.println("===>Correo Enviado...");
}
catch (Exception mex){
System.out.println("===>Error MailSender.send() = "+mex);
}
}
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/545145#545145]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 7 months
Re: [jboss-user] [jBPM] - Subprocess wait state signal handling not working from parent process (jBPM 4.3)
by apurv agnihotri
apurv agnihotri [http://community.jboss.org/people/apurv888] replied to the discussion
"Subprocess wait state signal handling not working from parent process (jBPM 4.3)"
To view the discussion, visit: http://community.jboss.org/message/545134#545134
--------------------------------------------------------------
In the same subprocess as above we are trying to use timer as well but as soon as the timer is added in subprocess xml i get following error irrespective of whether signal to the activity in subprocess(from main process) is given before or after timer due time(I am making the parent execution thread to sleep so as to signal execute whithin/after timer fire time).:-
May 27, 2010 7:23:30 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 2292, SQLState: 23000
May 27, 2010 7:23:30 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ORA-02292: integrity constraint (JBPM.FK_EXEC_SUBPI) violated - child record found
May 27, 2010 7:23:30 PM org.hibernate.event.def.AbstractFlushingEventListener performExecutions
SEVERE: Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException
: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#46] at org.hibernate.exception.SQLStateConverter.convert(
SQLStateConverter.java:94) at org.hibernate.exception.JDBCExceptionHelper.convert(
JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.delete(
AbstractEntityPersister.java:2569) at org.hibernate.persister.entity.AbstractEntityPersister.delete(
AbstractEntityPersister.java:2725) at org.hibernate.action.EntityDeleteAction.execute(
EntityDeleteAction.java:97) at org.hibernate.engine.ActionQueue.execute(
ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(
ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(
ActionQueue.java:172) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(
AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(
DefaultAutoFlushEventListener.java:64) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(
SessionImpl.java:996) at org.hibernate.impl.SessionImpl.list(
SessionImpl.java:1141) at org.hibernate.impl.QueryImpl.list(
QueryImpl.java:102) at org.jbpm.pvm.internal.hibernate.DbSessionImpl.deleteProcessDefinitionHistory(
DbSessionImpl.java:168) at org.jbpm.pvm.internal.cmd.DeleteDeploymentCmd.execute(
DeleteDeploymentCmd.java:78) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(
DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(
StandardTransactionInterceptor.java:54) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(
EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(
EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(
RetryInterceptor.java:55) at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(
SkipInterceptor.java:43) at org.jbpm.pvm.internal.repository.RepositoryServiceImpl.deleteDeploymentCascade(
RepositoryServiceImpl.java:73) at org.jbpm.test.JbpmTestCase.deleteRegisteredDeployments(
JbpmTestCase.java:166) at org.jbpm.test.JbpmTestCase.tearDown(
JbpmTestCase.java:95) at junit.framework.TestCase.runBare(
TestCase.java:140) at junit.framework.TestResult$1.protect(
TestResult.java:110) at junit.framework.TestResult.runProtected(
TestResult.java:128) at junit.framework.TestResult.run(
TestResult.java:113) at junit.framework.TestCase.run(
TestCase.java:124) at junit.framework.TestSuite.runTest(
TestSuite.java:232) at junit.framework.TestSuite.run(
TestSuite.java:227) at org.junit.internal.runners.JUnit38ClassRunner.run(
JUnit38ClassRunner.java:79) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(
JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(
TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:197) Caused by:
java.sql.SQLException: ORA-02292: integrity constraint (JBPM.FK_EXEC_SUBPI) violated - child record found
at oracle.jdbc.driver.DatabaseError.throwSqlException(
DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(
T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(
T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(
T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(
T4CPreparedStatement.java:543) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
OracleStatement.java:1028) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(
OraclePreparedStatement.java:2960) at org.hibernate.persister.entity.AbstractEntityPersister.delete(
AbstractEntityPersister.java:2551)
my timerlistener code is as below :-
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;
public class WaitStateTimeoutListener implements EventListener{
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void notify(EventListenerExecution arg0) throws Exception {
System.out.println("WaitStateTimeoutListener called");
// TODO Auto-generated method stub
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/545134#545134]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 7 months