You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by cristic83 <cr...@gmail.com> on 2011/02/22 10:03:28 UTC

Application discovery via the classpath

Hi guys,

I have a package structure of my EJBs(sateless and MDBs) like this: test,
test.pdf and test.scheduling. The packages test.scheduling contains some
MDBs that I want to remove from being loaded into my container, so I wanted
to remove all the classes from the test.scheduling package but keep
everything else from the packages test, test.pdf and all other subpackages. 
In order to do so, I have been trying to use the including/excluding paths
approach as described here:
http://openejb.apache.org/3.0/application-discovery-via-the-classpath.html

The code I used looks like this:

Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.LocalInitialContextFactory");
p.put("openejb.deployments.classpath.filter.descriptors", "true");//use
ejb-jar for ejbs discovery p.put("openejb.deployments.classpath.exclude",
"file:///<abosulte-path>/target/classes/test/pdf/");

This doesn't seem to work because I get the following warning:
WARN - Jar not loaded. classpath.ear.  No provider available for
resource-ref 'null' of type 'javax.jms.Destination' for
'MonthlyReportTrigger'.

MonthlyReportTrigger is one fo my MDBs from the test.scheduling package that
I expected to be excluded. 
After this, the code tries to lookup an ejb in the context which fails with
a NameNotFoundException exception.

Can you point me the right direction to go?(google didn't help ).
 
-- 
View this message in context: http://openejb.979440.n4.nabble.com/Application-discovery-via-the-classpath-tp3318799p3318799.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Application discovery via the classpath

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

not sure what you try: you ask for ejb-jar.xml and exclude your module so
normal it is not found. What is the expected behavior associated with this
config?

*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: http://rmannibucau.wordpress.com*




2012/8/23 eltonk <ku...@gmail.com>

> Hello!
>
> I'm have the same problem that you.
>
> How could you configure the excludes classpath into your case?
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Application-discovery-via-the-classpath-tp3318799p4657026.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Application discovery via the classpath

Posted by eltonk <ku...@gmail.com>.
Hello!

I'm have the same problem that you.

How could you configure the excludes classpath into your case?

Thanks!



--
View this message in context: http://openejb.979440.n4.nabble.com/Application-discovery-via-the-classpath-tp3318799p4657026.html
Sent from the OpenEJB User mailing list archive at Nabble.com.