[JBoss Seam] - Intercepting component installation
by christian.bauerï¼ jboss.com
I'm writing some (configuration level) code that needs to know which Seam components are installed. It actually needs to know which Seam components also have a @my.Configuration("description") annotation.
My current approach is to register these manually in components.xml:
| <component name="systemConfiguration" class="SystemConfiguration">
| <property name="configurableComponents">
| <key>fooComponent</key><value>description one</value>
| <key>barComponent</key><value>description one</value>
| ...
| </property>
| </component>
|
Ideally I'd like to either listen to events send by the Seam deployer, or if that is way to early in the boot to get events/listeners going, I'd like to access the Seam component "repository" programmatically later on. I only found methods like Component.forName(), no Component.getAll().
I'm also thinking about subclassing ComponentScanner as ConfigurationScanner and scanning again for my annotation, but that is probably slowing down the boot procedure.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031333#4031333
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031333
19Â years, 1Â month
[JBoss Seam] - Re: Separate database for jBPM
by irVega
That's done the trick, thanks.
So if I understand correctly,
1 - In the dvdstore app, hibernate.cfg.xml effects only jBPM. It has no impact on how the entity beans are persisted.
2 - jboss-beans.xml is not relevant at all for the dvdstore example (I've deleted it with no apparent side-effects).
3 - each deployed SEAM (with jBPM) application can provide its own jBPM database with a separate *-ds.xml (as long as it uses a unique jndi name).
4 - the app-server (jboss/hibernate/seam ...) will try to run import.sql against all persistence-units that are loaded (?). This is good for my dvdstore database but no good for the jBPM database (throws an exception when it can't delete from one of the domain tables (ORDERLINES)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031332#4031332
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031332
19Â years, 1Â month
[JBoss Seam] - Re: Compliance of the EAR of the booking demo?
by christian.bauerï¼ jboss.com
Do not forget that this is completely broken too:
- you need a space separated list of values on an entry named "Class-Path:" in your WAR and EJB-JAR META-INF/MANIFEST.MF, with all the JARs these need
- you need to have a newline character after that line
- you need to have _some_ content in the line following this line, otherwise it is, at least in the J2EE 1.4 compatible JBoss AS 4.0, completely ignored
This last one did cost me one day. However, after treating a Seam application like that, it works just as well as with the Java client JAR list in application.xml. I thought it would be faster to deploy because the EJB3Deployer would not scan the MANIFEST.MF entries (it scans the Java modules of the EAR), but there was some new cryptic INFO message showing up after that indicating that is doing something special now to scan - which took just as long.
This is all a complete nightmare. Here is hope that we'll get the promised EAR/lib/ soon. Or better, can deploy everything in a WAR structure, EJBs and all.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031328#4031328
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031328
19Â years, 1Â month
[JBoss jBPM] - Best practices for cancelling a workflow
by pwfarwell
I need a way to cancel a workflow and have a handler fire, letting me know that the process was terminated abnormally. I'd like the handler to fire only when the process terminates in a non-standard way. For instance, I need to do some clean up of business code, clean up that I wouldn't have to do if the workflow ended normally.
What's the recommended way to do this?
I know about ProcessInstance.end(). Is there a way to create a handler or an event that let's me know (in Java code) when the workflow was terminated abnormally, ie. because of a call to end()?
As an alternative, I can associate a Node named "cancel" with each step of the workflow, and signal each Task/Node/State to transition to the "cancel" node. But that seems clumsy - since I'd have to define a "cancel" step for every workflow and create a transition to it from every workflow node.
A better way?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031327#4031327
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031327
19Â years, 1Â month
[JBoss Messaging] - Connection not authorized to addMessages to destination
by MThoresen
Newbee here. Doing a simple wholesaler and retaler jms example.
1) wholesaler creates a temporarytopic and subscribes to it.
2) when wholesaler publishes a message, it sets the message's JMSReplyTo to the temporaryTopic.
3) When retailer receives a message from wholesaler, it does some stuff and then based on calculations, it will publish a message to the message.getJMSReplyTo(). Here is the basic code snipets..
wholesaler:
hotDealsTopic = (Topic) jndi.lookup("topic/Hot Deals");
publisher = pubSession.createPublisher(hotDealsTopic);
buyOrdersTopic = subSession.createTemporaryTopic();
subscriber = subSession.createSubscriber(buyOrdersTopic);
subscriber.setMessageListener(this);
when publishing:
StreamMessage message = pubSession.createStreamMessage();
message.writeString(dealDesc);
message.writeString(itemDesc);
message.writeFloat(oldPrice);
message.writeFloat(newPrice);
message.setStringProperty("Username", username);
message.setStringProperty("Itemdesc", itemDesc);
message.setJMSReplyTo(buyOrdersTopic);
publisher.publish(message, DeliveryMode.PERSISTENT, Message.DEFAULT_PRIORITY,1800000);
Retailer: on Receive and process:
TextMessage textMsg = session.createTextMessage();
textMsg.setText(count + " " + itemDesc);
Topic buyTopic = (Topic) message.getJMSReplyTo();
publisher = session.createPublisher(buyTopic);
textMsg.setJMSCorrelationID("DurableRetailer");
publisher.publish(textMsg, DeliveryMode.PERSISTENT, Message.DEFAULT_PRIORITY, 1800000);
JMSSecurityException:
avax.jms.JMSSecurityException: Connection not authorized to addMessages to destination: JMS_TT5
at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:167)
at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:226)
at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:112)
at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:111)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031325#4031325
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031325
19Â years, 1Â month
[JBoss jBPM] - Re: Deploying jbpm-enterprise.ear from jbpm-jpdl-suite-3.2.B
by crussell42
Yea some success. I have some better distilled down notes I will try to add.
Still a rather frustrating solution. I wish at least we could see some more info on release timelines and more docs.
I basically had to drop back to compiling from source since I was making some changes to allow annotated classes to be persisted (my classes not using class-name.hbm.xml style persistence descriptors). There is a jira item on this and I think they will include the change to an AnnotatedConfiguration which will allow statements like:
| <mapping class="com.mycompany.entity.MyClass"/>
|
in hibernate.cfg.xml.
Here is an ant build script you can use to expand and contract the jbpm-enterprise.ear so that you can edit the hibernate.cfg.xml
just ant expand
make your edits
ant build
| <project name="hpfm-jbpm">
|
| <property name="basedir" value="."/>
| <property name="built.dir" value="${basedir}/built"/>
| <property name="expand.dir" value="${basedir}/expand"/>
| <property name="jboss.deploy.dir" value="/usr/local/jboss/server/messaging/deploy"/>
|
|
| <target name="clean">
| <delete dir="${built.dir}" />
| </target>
|
| <target name="prepare">
| <mkdir dir="${built.dir}" />
| <mkdir dir="${expand.dir}" />
| </target>
|
| <target name="expand" description="expand ear into the expand dir" depends="prepare">
| <!-- UNZIP THE EAR FILE -->
| <unzip src="${basedir}/jbpm-enterprise.ear" dest="${expand.dir}" />
|
| <mkdir dir="${expand.dir}/jbpm-console-war" />
| <unzip src="${expand.dir}/jbpm-console.war" dest="${expand.dir}/jbpm-console-war" />
|
| <mkdir dir="${expand.dir}/jbpm-enterprise-jar" />
| <unzip src="${expand.dir}/jbpm-enterprise.jar" dest="${expand.dir}/jbpm-enterprise-jar" />
|
| <mkdir dir="${expand.dir}/lib/jbpm-configs-jar" />
| <unzip src="${expand.dir}/lib/jbpm-configs.jar" dest="${expand.dir}/lib/jbpm-configs-jar" />
|
| <mkdir dir="${expand.dir}/lib/jbpm-identity-jar" />
| <unzip src="${expand.dir}/lib/jbpm-identity.jar" dest="${expand.dir}/lib/jbpm-identity-jar" />
|
| <mkdir dir="${expand.dir}/lib/jbpm-jpdl-jar" />
| <unzip src="${expand.dir}/lib/jbpm-jpdl.jar" dest="${expand.dir}/lib/jbpm-jpdl-jar" />
|
| </target>
|
|
|
| <target name="contract" description="remake all the parts to the parts directory" depends="prepare">
|
| <!-- ZIP CONTENTS OF THE EXPAND/LIB DIRECTORY-->
|
| <zip destfile="${expand.dir}/lib/jbpm-jpdl.jar">
| <fileset dir="${expand.dir}/lib/jbpm-jpdl-jar" />
| </zip>
|
| <zip destfile="${expand.dir}/lib/jbpm-identity.jar">
| <fileset dir="${expand.dir}/lib/jbpm-identity-jar" />
| </zip>
|
| <zip destfile="${expand.dir}/lib/jbpm-configs.jar">
| <fileset dir="${expand.dir}/lib/jbpm-configs-jar" />
| </zip>
|
| <!-- ZIP CONTENTS OF THE EXPAND DIRECTORY-->
|
| <zip destfile="${expand.dir}/jbpm-enterprise.jar">
| <fileset dir="${expand.dir}/jbpm-enterprise-jar" />
| </zip>
|
| <zip destfile="${expand.dir}/jbpm-console.war">
| <fileset dir="${expand.dir}/jbpm-console-war" />
| </zip>
|
| </target>
|
|
|
| <!--
| <target name="build" depends="prepare, make-parts">
| <ear destfile="${built.dir}/jbpm-enterprise.ear" appxml="${parts.dir}/META-INF/application.xml">
| <fileset dir="${parts.dir}">
| <exclude name="META-INF/application.xml" />
| </fileset>
| </ear>
| </target>
| -->
|
| <target name="build" depends="prepare, contract">
| <ear destfile="${built.dir}/jbpm-enterprise.ear" appxml="${expand.dir}/META-INF/application.xml">
| <fileset dir="${expand.dir}" includes="*.war,*.jar,lib/*.jar" >
| <!--
| <exclude name="META-INF/application.xml" />
| <exclude name="jbpm-enterprise-jar" />
| <exclude name="jbpm-console-war" />
| <exclude name="lib/jbpm-identity-jar" />
| <exclude name="lib/jbpm-configs-jar" />
| <exclude name="lib/jbpm-jpdl-jar" />
| -->
|
| </fileset>
| </ear>
| </target>
|
|
| <target name="deploy" depends="build">
| <copy file="${built.dir}/jbpm-enterprise.ear" todir="${jboss.deploy.dir}"/>
| </target>
|
|
| </project>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031322#4031322
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031322
19Â years, 1Â month