[JBoss Seam] - Test EJB3/Seam from eclipse
by jfrankman
If I should be asking this in another forum, please let me know.
I am slowly coming up to speed with seam and really enjoy it. But I cannot figure out how to test or execute my data access layer unless it is running inside of JBoss. Before with struts, I did not have EJB, just plain POJOs and Hibernate xml mappings, so I could test my methods (i.e. daoClassA.findById() ) right from eclipse either as unit test or even using a small test class with println statements without deploying to JBoss. But now my DAO's get the TransactionManager from Seam and the database mapping are annotations in my POJOs instead of xml files.
This may seem like a stupid question to seasoned Java developers, but I am just getting started. Can someone explain if there is a way to run or test my DAO and mapped pojos from inside Eclipse?
I have been looking into an "embeddable container" to run the tests. Am I on the right track?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046900#4046900
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046900
18 years, 11 months
[JBoss Portal] - Re: http://jira.jboss.com/jira/browse/JBPORTAL-459 You shoul
by swestbom
BTW what is with jsf-example.jar containing the Facelet bridge class.
Also replace the method in the class with this one so it works within and outside the portal.
protected ResponseWriter createResponseWriter(FacesContext context)
throws IOException, FacesException
{
ExternalContext extContext = context.getExternalContext();
if(extContext.getRequest() instanceof ServletRequest)
return super.createResponseWriter(context);
RenderKit renderKit = context.getRenderKit();
RenderRequest request = (RenderRequest)extContext.getRequest();
RenderResponse response = (RenderResponse)extContext.getResponse();
String contenttype = request.getResponseContentType();
if(contenttype == null)
contenttype = "text/html";
String encoding = response.getCharacterEncoding();
if(encoding == null)
encoding = "ISO-8859-1";
ResponseWriter writer = renderKit.createResponseWriter(FaceletViewHandler.NullWriter.Instance, contenttype, encoding);
contenttype = writer.getContentType();
response.setContentType(contenttype);
writer = writer.cloneWithWriter(response.getWriter());
return writer;
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046895#4046895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046895
18 years, 11 months