This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | [65cat] appclient functionality not available from within NetBeans | ||
---|---|---|---|
Product: | javaee | Reporter: | wobster <wobster> |
Component: | App Client | Assignee: | David Konecny <dkonecny> |
Status: | NEW --- | ||
Severity: | blocker | CC: | vkraemer |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
wobster
2008-06-21 15:54:05 UTC
Has this been addressed in 6.8? No, sorry it was not. I cannot say I'm absolutely clear on what you are requesting. You have an MDB deployed to a server and you want to test it. I would create an AppClient project and in its main method declared your EJB as variable with @Ejb annotation. When you run the project your EJB will be injected and you can do with it whatever you want. Or what am I missing? Adding Vince to CC list - he might know more. (In reply to comment #2) > No, sorry it was not. > > I cannot say I'm absolutely clear on what you are requesting. You have an MDB > deployed to a server and you want to test it. I would create an AppClient > project and in its main method declared your EJB as variable with @Ejb > annotation. When you run the project your EJB will be injected and you can do > with it whatever you want. Or what am I missing? > > Adding Vince to CC list - he might know more. David, I'm looking for the ability to specify the JMS channel parameters in the annotations of the client code and then have NetBeans inject the references in the same way that the application server would inject the references. Right now, I have to do all my own lookups and such if I want to run the JMS client code outside of the application server. Thanks, Rob Rob, thanks, I think I understand what you are after now. You have a MDB which you deployed and you would like to test it. At the moment the only way is to create a separate AppClient project, inject MDB into its main method and test it. Let's call this option #1. What you are after is (#2) to be able to just write main class with "@Inject MyMDB myMdbInstance;" and some code testing myMdbInstance and be able to press Run on it. NB should in this case run file within application server context and inject the MDB. There is also option #3 (does this option make sense?): enhance server node in Services panel to not only list JMS queues but let test them; or similarly as for Web Services list MDBs in project under a special node in project logical structure and allow user to test them by sending messages etc. Looking once again at #2 - one thing which I do not like is that you end up mixing Java classes for testing of your MDB with real project sources. I would probably prefer to either move testing files to separate dedicated project (ie. option #1) or write plain unit tests for my MDB which would use JNDI lookup to retrieve the instance and perform whatever testing is desirable (I do not think it would be easy to convince app server to execute junit test and inject MDB into it; though there might be a framework doing that). Did I get it right? |