[JBoss jBPM] - deployment in JBoss
by bill.burkeï¼ jboss.com
I would like to write a JBoss Deployer for jBPM. Basically it would work like this:
1) Create a table:
create table PROCESS_DEF_HASHES(
name VARCHAR,
hashcode long
);
2) Read the XML file. Create a MD5 hash of the file.
3) select * from PROCESS_DEF_HASHES where name="pd name of file" AND hashcode = MD5 hash
4) If query returns anything, do nothing and return
5) Create new Process Definition
6) Search to see if any old Process Definitions have Instances. If not, delete all the old ones, keep the ones that have process instances.
Sound cool? Then you wouldn't have to have an ANT step and could create bundled, scoped .jbpm archives like we do for EJB, EAR, WAR, ESB, HAR, etc...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030372#4030372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030372
19Â years, 1Â month
[JBoss Seam] - long running transaction
by gregoï¼ spiekerpoint.com
Hi
I'm writing an application that processes a huge amount of data. I want to kick this off in the middle of the night with a timer service inside of the app server so that the slsb can chew on the problem set for a few hours and shove data into the database when needed.
Now, the issue is the transaction times out. It's a bad idea to extend the transaction timeout to hours, so I figured I would bracket the database work by opening and closing the transaction (since I know where the delimiters are).
Ok, so Seam isn't letting me do things like:
| while(moreDataToProcess) {
| someProcessing();
|
| entityManager.getTransaction().begin();
| ...
| entityManager.persist(obj);
| entityManager.getTransaction().commit();
|
| otherProcessing();
| }
|
giving an error of:
ERROR [org.jboss.ejb.txtimer.TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBException: java.lang.IllegalStateException: Illegal to call this method from injected, managed EntityManage
There must be a way to tell Seam to quick trying to control the transaction inside of a particular slsb (or for the whole app server) - but for the life of me I can't find documentation or posts on how to do that.
Any pointers to docs or posts, or comments on how to approach this?
Thanks,
Greg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030369#4030369
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030369
19Â years, 1Â month
[JBoss Seam] - Re: Seam Tools, Project Structures, and IDEs
by Delphi's Ghost
First off, thank you all for the replies.
Gavin, the release of RHDS may take months, but that isn't a problem. This project is in-house and will be in production for the next decade so it is still worth it for us to aim for RHDS as the tool to use long term.
While the Seam-Gen route is pretty easy, using the Seam reference guide and having a Seam-Gen app to look at, I found it pretty straight forward to create my own Ear project in Netbeans and get it up and running. Most of my delays were due to doing it piecemeal, when I should have just added all the elements at once.
The seam reference is a great document, and is very thorough in letting developers know which pieces go where and why. However, I'm sure without examples and documentation, it would take weeks to do, which is a testament to the quality of the Seam reference as I did it in about a week including interruptions, and making mistakes.
One problem with Seam-Gen is it looks ugly in eclipse (src folder at the top, 20+ jars, and then the view folders at the bottom). I suppose I could put the jars in a library for the purpose of being tidy in the IDE.
Good to know the WTP stuff in Eclipse is flawed, at least I know it's not just me messing it up.
Tony, your project type is the kind we want to use, but it looks like MyEclipse adds a few things to the standard Eclipse that makes it easier to use Ear projects. The problem in standard Eclipse was forcing it to put jars into the ear folder which it seems is no problem with MyEclipse. MyEclipse may be an option for us until RHDS comes out, especially as it has the exploded deployment options.
Stu2, you are correct. I just tried it again to check I wasn't mistaken as I'd mostly assumed that since you can't bind a Seam-Gen project to a server in the IDE, it couldn't debug it in the IDE, but obviously you can!. This changes a few things, since it means we can do a generic project with our own ant script, or use Seam-Gen and get the benefits of IDE debugging when needed.
Great stuff all,
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030367#4030367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030367
19Â years, 1Â month
[JBossWS] - How Do I See the XML?
by flindet
Hi,
I'm new to JBossWS. I'm using JBossWS 1.2.0.SP1, installed into JBoss AS 4.0.5.
I've created an SEI Document/Wrapped web service (unless I'm confused). I have unit tests that prove that my web service is working. It's a very simple web service based heavily on the "echo" example included with JBossWS.
It's my understanding from reading the documentation that somehow JBossWS is converting between Java objects and XML, presumably via JAXB.
anonymous wrote : JAX-WS simplifies the development model for a web service endpoint a great deal. In short, an endpoint implementation bean is annotated with JAX-WS annotations and deployed to the server. The server automatically generates and publishes the abstract contract (i.e. wsdl+schema) for client consumption. All marshalling/unmarshalling is delegated to JAXB
I'd like to see the XML that's theoretically being generated and passed along the wire so that I can 1) confirm it matches the schema I expect and 2) better understand how this is all working.
Ideally, I'd also like to have a unit test that looks at the raw XML because my expected client will not have JAXB, and will probably be in a .NET environment.
None of the code that I wrote invokes an Unmarshaller. I'm assuming this is magically done for me.
Can anyone shed some light and help me learn where I'm confused? Thanks for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030366#4030366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030366
19Â years, 1Â month
[JBoss Portal] - Re: Securing Portlet Modes
by Antoine_h
yes, interesting feature : mode depending on roles.
but for what I know it is not in the JSR-168
and may be long before you get it in specific vendor feature in jboss portal. (they go quick ! but you seem to need it now...)
to do that in the mean time (1) :
- set the window security to all user
- in the portlet rendering (for the decoration and put the mode icons) : rewrite one of the rendering class, configure it into the layout, configure the window so it use this rendering
- in this class, make the "if user ok", then show the icon of the mode, if not don't show it.
the portlet rendering is the more complicated thing :
- not sure you will have access to what user is calling this window rendering... so look how it works, and how you can get the user Principal, or RemoteUser things from there.
(2) other way, for the portlet decoration rendering
- in the do view, if the mode and user policy say "no edit mode", add a special CSS stylesheet in the header of the page. (specific css for this portlet).
- in the css, set the html tag of the edit mode to "not visible" (or no image...)
- you may play with the definition of css style like #MyPortletContainer #TheEditModeIcon. This to make sure only this portlet window will disable the edit icon
- even if you can't have the (1) solution, you may have to rewrite a rendering class, to adjust the class and id of html tags, so it fit your needs.
well, that's for the rendering
for the security : in the do view, check the user and mode policy, and if it is a forbidden mode, show nothing in the view.
because someone can ask the edit mode with playing with the url directly, (without clicking on the icon).
it is "not quick and dirty"... but you may have what you need, before it is implemented in jboss portal.
also think of the cache stuff : if not logged, the user get the window with no edit mode. then he log as admin : the cached window will show without the icon... not good for the admin.
I am quite shure the cache process does not check this kind of situation.
to invalidate the cache of all portlets when logged, see some previous posts...
or put this portlet with no cache, if you can afford it with cpu.
hope that helps... and there are no other trouble in the way that I did not see...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030364#4030364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030364
19Â years, 1Â month
[JBoss Seam] - Hotel Booking Example: doc and src are out of sync
by kingcu
Dear Seam Project Team,
While reading Seam Reference Documentation (1.2.0 patch1), in section 1.6.2, it mentioned: "Finally, the LoggedIn annotation and the LoggedInInterceptor are used to protect actions that require a logged in user.". However, when looking at the source directory jboss-seam-1.2.0.PATCH1\examples\booking\src\org\jboss\seam\example\booking, there is no LoggedIn annotation class, nor do the other classes use this annotation.
I know the old way of doing security check: make a filter, implement the security check logic in the filter and map it to the url or servlet. I would be very interested to know how to implement a global security check as an interceptor and make it annotation. Can someone post an example of the LoggedIn annotation and LoggedIn interceptor?
Thanks,
Tong
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030362#4030362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030362
19Â years, 1Â month