[EJB/JBoss] - Re: Unit Testing Practices
by jantzen
Hi Gommo and Tarantula,
I'm glad you guys got something working with Embedded JBoss. I guess I'll take a another stab at that approach. How are you bundling and running the tests with your application? In other words, where does Embedded JBoss live compared to the real server, and how do your unit tests find it?
Ideally, I'd have Embedded JBoss bundled in with my application so developers could check the whole project out of source control and be able to run the tests, but with 20+ jars that seems unwieldy. Also, are you running the TestNG units from Eclipse? I was unable to load configuration files for the embedded server while running JUnits from Eclipse, so if you have any suggestions there I'd appreciate it.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995450#3995450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995450
19 years, 4 months
[JBoss Eclipse IDE (users)] - Re: How contribute to Freemarker plugin and add my Plugin ec
by azerr
Hi max,
thank you for you answer. I will send you my Freemarker Plugin updated and I will explain you new features that I added.
For Akrogen, I'm agree with you, at first you believe Akrogen is the same thing that hibernate tool, because it can generate Bean although Hibernate tool generate it.
But Akrogen can generate any component of Web Application, like DAO, Service, Action Struts, JSP. With Hibernate mapping you can generate XML PageConfig (XML Akrogen description for describe a form (CRUD form, list form,...).
It exist's a lot of Generator Plugin which generate code, BUT just for one technology and architecture (ex : EclipseWork which generate components just for Web Work). With Akrogen, I would like give several default template for My Architecture that I use (Service/DAO with Spring and Hibernate and Struts). But I want add wizzard to add easily your own template, because each project and people use their own architetecture.
With Akrogen, you could generate components for PHP project.
XML is the model of your template (XSL or freemarker), so you could use for instance WSDL XML model to generate other components, or XMI,...
XML Akrogen component is the XML description for the component that you want generate (description, title, input parameters, template to use,...). Once you have create an XML component, you can register it to use with Wizard Eclipse.
If you have another questions, tell me.
Angelo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995448#3995448
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995448
19 years, 4 months
[JBoss Seam] - ASync calls stays in JBoss queue after restart
by m_hess
Hi,
What I basically have, is just a test bean, with an ASynchronous method:
| @Local
| public interface AsyncTest {
|
| @Asynchronous
| public void runAsync(@Expiration Date firstCall, @IntervalDuration long interval);
|
| }
|
This works fine so far. Meaning I can set a firstCall date, and an milisecond interval, so that runAsync() is called e.g. every five seconds after a initial 1 minute delay.
Problem is, that this "Timer" (or whatever is created in the background) stays there for good. If I shut down JBoss and restart it, somewhere in the startup this timer-api seems to kick in again, and I get messages like this:
| 21:10:45,223 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
|
And after my applications ear has been deployed, it changes to
| 21:18:05,032 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: asyncTest
|
But note(!): A new "timer" is also created by the fresh startup, so my log also shows the test debug message I put in the implementation of runAsync(). So this gets worse with every startup that also deploys my application. So far the only way I found to get rid of this, is to delete the JBoss internal Hypersonic database in
jboss-4.0.5.GA/server/default/data/hypersonic
but I believe that there must be a better way to deal with this.
I think my issue is related to the "persistent" Timers that JBoss provides, so I guess the Jboss AS forum is the place to look for help. But maybe I can fix this with some simple line in the "@Destroy/@Remove" methods?
Thanks for insights any of you can give.
bye, Michael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995442#3995442
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995442
19 years, 4 months
[JBossWS] - wstools ignoring <xsd:choice> ??
by ajay662
In my wsdl there is a choice element somewhere. I am using wstools to generate the java classes from my wsdl, but wstools seems to be ignoring the "xsd:choice" element.
Below are snippets from my wsdl and corresponding generated java classes:
WSDL
<xsd:complexType name="Parameter">
| <xsd:sequence>
| <xsd:element name="name" type="xsd:string">
| </xsd:element>
| <xsd:choice>
| <xsd:element name="scalarValue" type="xsd:string">
| </xsd:element>
| <xsd:element name="arrayValue" type="xsd:boolean">
| </xsd:element>
| </xsd:choice>
| </xsd:sequence>
| </xsd:complexType>
The generated java class
/*
| * JBossWS WS-Tools Generated Source
| *
| * Generation Date: Wed Dec 20 15:18:01 EST 2006
| *
| * This generated source code represents a derivative work of the input to
| * the generator that produced it. Consult the input for the copyright and
| * terms of use that apply to this source code.
| */
|
| package com.covergence.enms.ws.templates;
|
|
| public class Parameter
| {
|
| protected java.lang.String name;
| public Parameter(){}
|
| public Parameter(java.lang.String name){
| this.name=name;
| }
| public java.lang.String getName() { return name ;}
|
| public void setName(java.lang.String name){ this.name=name; }
|
| }
Even though jaxrpc-bindings file look ok
<java-xml-type-mapping>
| <java-type>com.covergence.enms.ws.templates.Parameter</java-type>
| <root-type-qname xmlns:typeNS='http://www.covergence.com/ws/templates'>typeNS:Parameter</root-type-qname>
| <qname-scope>complexType</qname-scope>
| <variable-mapping>
| <java-variable-name>name</java-variable-name>
| <xml-element-name>name</xml-element-name>
| </variable-mapping>
| <variable-mapping>
| <java-variable-name>scalarValue</java-variable-name>
| <xml-element-name>scalarValue</xml-element-name>
| </variable-mapping>
| <variable-mapping>
| <java-variable-name>arrayValue</java-variable-name>
| <xml-element-name>arrayValue</xml-element-name>
| </variable-mapping>
| </java-xml-type-mapping>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995440#3995440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995440
19 years, 4 months