[EJB 3.0 Users] - Re: Client calls Timer only once
by Fuchs
after i deploying my application i get this error from the java console:
[java] Exception in thread "main" javax.naming.NameNotFoundException: CustomerArchivTimerBean not bound
| [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| [java] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| [java] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| [java] at java.lang.reflect.Method.invoke(Method.java:597)
| [java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
| [java] at sun.rmi.transport.Transport$1.run(Transport.java:159)
| [java] at java.security.AccessController.doPrivileged(Native Method)
| [java] at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
| [java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
| [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
| [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
| [java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
| [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
| [java] at java.lang.Thread.run(Thread.java:619)
| [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
| [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
| [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
| [java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
| [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
| [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| [java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
| [java] at ejb3.timer.client.CustomerArchivClient.testClusterScheduleIntervalTimer(CustomerArchivClient.java:22)
| [java] at ejb3.timer.client.CustomerArchivClient.main(CustomerArchivClient.java:15)
| [java] Java Result: 1
The JBoss console says:
ObjectName: jboss.j2ee:jar=customerTimer.ejb3,name=CustomerArchivTimerBean,service=EJB3
| State: FAILED
| Reason: java.lang.IllegalArgumentException: ejb3.timer.bean.CustomerArchivTimerBean is not an interface
in the jboss web-console the ejb3-service CustomerArchivTimerBean is registered. i am confused why the Bean isnt found.
is there anyone who has an idea what i am doing wrong this time, or what the exception mean?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262238#4262238
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262238
16 years, 6 months
[EJB 3.0 Users] - @EJB: can it be used to look up a remote bean on another ser
by ljnelson
My colleague asked me whether it's possible somehow to deploy a .war file, containing a servlet with an @EJB reference to a stateless session bean, on JBoss server A, and an ejb .jar file, containing the bean so referenced, on JBoss server B.
My immediate answer was no, but then I hesitated. Perhaps there's a vendor specific way to accomplish this?
The broader context is that we're looking to see what we'd have to do if a client of ours were to want to scale horizontally--i.e. have many .war instances all talking to a remote, behind-the-DMZ EJB server. Personally I think this is a bad idea, since the web tier is rarely the bottleneck point, but supposing we had a particularly difficult customer who wanted to do this--is there anything we could tell him?
Ordinarily, of course, you'd ship the .war file and the EJB .jar file as part of an .ear file, dump it in one server, and scale the server (i.e. garden variety clustering, or vertical scaling, or whatever you want to call it). But we have customers who like for whatever reason to put their web stuff on one box and their business logic on another.
Any pointers are gratefully appreciated.
Best,
Laird
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262233#4262233
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262233
16 years, 6 months
[jBPM Users] - [JBPM 4.1] could not initialize proxy - no Session
by Alkero
I have a "could not initialize proxy" exception in a workflow when I try to get the process definition id from tasks which are between a fork and a join. The problem doesn't occur if I have not a split/join implementation.
Process Definition:
<?xml version="1.0" encoding="UTF-8"?>
|
| <process key="id" name="id" xmlns="http://jbpm.org/4.0/jpdl">
| <start g="123,34,32,29" name="start1">
| <transition to="fork2"/>
| </start>
| <end g="137,339,120,108" name="end1"/>
| <join g="-52,68,42,30" name="join1"/>
| <fork g="126,108,46,26" name="fork2">
| <transition to="task1"/>
| <transition to="task2"/>
| </fork>
| <task assignee="test" g="70,189,71,53" name="task1">
| <transition to="join2"/>
| </task>
| <task assignee="test" g="167,189,83,49" name="task2">
| <transition to="join2"/>
| </task>
| <join g="136,262,58,45" name="join2">
| <transition to="end1"/>
| </join>
| </process>
Test case:
package org.jbpm.examples.processdefinition.id;
|
| import java.util.List;
| import org.jbpm.api.Execution;
| import org.jbpm.api.ProcessInstance;
| import org.jbpm.api.task.Task;
| import org.jbpm.test.JbpmTestCase;
|
| /**
| * @author David Loiseau
| */
|
| public class ProcessDefinitionIdTest extends JbpmTestCase {
|
|
| String deploymentId;
|
| protected void setUp() throws Exception {
| super.setUp();
|
| deploymentId = repositoryService.createDeployment()
| .addResourceFromClasspath("org/jbpm/examples/processdefinition/id/process.jpdl.xml")
| .deploy();
| }
|
| public void testFindProcessDefinitionIdFromExecution(){
| String actorName = "test";
| ProcessInstance processInstance = executionService.startProcessInstanceByKey("id");
| List<Task> tasks = taskService.findPersonalTasks(actorName);
| for(Task task : tasks){
| Execution execution = processEngine.getExecutionService().findExecutionById(task.getExecutionId());
| String processDefinitionId = execution.getProcessInstance().getProcessDefinitionId();
| assertNotNull(processDefinitionId);
| }
| }
|
| protected void tearDown() throws Exception {
| repositoryService.deleteDeploymentCascade(deploymentId);
|
| super.tearDown();
| }
|
|
| }
|
Exception:
### EXCEPTION ###########################################
| 17:26:39,203 SEV | [BaseJbpmTestCase] TEST THROWS EXCEPTION: could not initialize proxy - no Session
| org.hibernate.LazyInitializationException: could not initialize proxy - no Session
| at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:86)
| at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
| at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_4.getProcessDefinitionId(ExecutionImpl_$$_javassist_4.java)
| at org.jbpm.examples.processdefinition.id.ProcessDefinitionIdTest.testFindProcessDefinitionIdFromExecution(ProcessDefinitionIdTest.java:32)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at junit.framework.TestCase.runTest(TestCase.java:164)
| at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
| at junit.framework.TestCase.runBare(TestCase.java:130)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:120)
| at junit.framework.TestSuite.runTest(TestSuite.java:230)
| at junit.framework.TestSuite.run(TestSuite.java:225)
| 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)
| ### EXCEPTION ###########################################anonymous wrote :
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262224#4262224
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262224
16 years, 6 months
[JBoss Microcontainer Users] - Optional depends?
by pferraro
Is there a way to express an optional dependency between beans? e.g. install bean A before bean B, but only if bean A exists.
In psuedo-markup:
<bean name="A" class="...">
| <!-- A depends on B, if B exists -->
| <depends optional="true">B</depends>
| </bean>
| <bean name="B" class="..."/>
The "optional" aspect would be transparent if it were possible to describe the dependency within the guardian bean, instead of the dependent bean.
e.g. In pseudo-markup:
<bean name="A" class="..."/>
| <bean name="B" class="...">
| <!-- A depends on B, but dependency is described in B, instead of A -->
| <dependent>A</dependent>
| </bean>
The use case for this in the AS is mod_cluster, whose service bean must be installed before (and undeployed after) the WebServer bean. Normally, this would be expressed as jbossweb depends on mod_cluster, but jbossweb should not require mod_cluster. Thoughts?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262221#4262221
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262221
16 years, 6 months
[jBPM Users] - Re: Action associated with timer is not invoked
by jbosspnet
Thanks for you reply. I also think that the problem is in configuration. Actually my jbpm.cfg.xml is
<jbpm-configuration>
|
| <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
| <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
|
| <!-- configuration resource files pointing to default configuration files in jbpm-jpdl.jar -->
| <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
| <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
| <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
| <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
| <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
| <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
| <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
| <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
|
| <int name="jbpm.byte.block.size" value="1024" singleton="true" />
| <string name="jbpm.mail.smtp.host" value="localhost" />
| <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
| <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
| <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
|
| <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor" singelton="true" />
| </jbpm-configuration>
As you see I have the entry:
| <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
Is it the same of
<import resource="jbpm.businesscalendar.cfg.xml"/>
as you have wrote?
Otherwise, where can I find and define the resources "jbpm.jobexecutor.cfg.xml" and "jbpm.businesscalendar.cfg.xml" ?
Regards.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262217#4262217
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262217
16 years, 6 months