You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com> on 2013/04/06 19:18:01 UTC

TomEE Tomat 7 Resources deployed

I am using TomEE as the Application Server. TomEE uses Tomcat 7. I have the
following code:

    package com.jndi;

    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.Name;
    import javax.naming.NamingException;
    import javax.naming.RefAddr;
    import javax.naming.Reference;
    import javax.naming.spi.ObjectFactory;


    public class GitObjectFactory implements ObjectFactory {

	public GitObjectFactory() {
		
	}
	
	public Object getObjectInstance(Object obj, Name name, Context nameCtx,
Hashtable     environment) throws NamingException {
		GitConnection gitConnection = new GitConnection();
		// Customize the bean properties from our attributes
		Reference ref = (Reference) obj;
		RefAddr refAddr = ref.get("gitLocation");
		String value = (String) refAddr.getContent();
		gitConnection.setGitLocation(value);
		return gitConnection;
	}
    }

    public class GitConnection {
	
	private String gitLocation;
	
	public GitConnection() {
		
	}
	
	public String getGitLocation() {
		return gitLocation;
	}

	public void setGitLocation(String gitLocation) {
		this.gitLocation = gitLocation;
	}
     }

    in context.xml
    <Context>

    
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
	<Resource name='git/GitConnectionFactory' auth='Container'
	type='com.jndi.GitConnection'
	factory='com.jndi.GitObjectFactory'
    gitLocation='C:\jGitClone\.git'/>
    
   in web.xml
   <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
		 version="2.5">
		 		 
		 <context-param>
		 	

		 	/WEB-INF/spring/email.xml
		 </context-param>
		 
		 <listener>
		 	
		 
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
		 </listener>
		 
		 <servlet>
		 	<servlet-name>i</servlet-name>
		 
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		 	<load-on-startup>1</load-on-startup>
		 </servlet>
		 
		 <servlet-mapping>
		 	<servlet-name>i</servlet-name>
		 	<url-pattern>/</url-pattern>
		 </servlet-mapping>
		 
		 <welcome-file-list>
		 	<welcome-file>index.jsp</welcome-file>
		 </welcome-file-list>
		 
		 <resource-env-ref>
		 	<description>Object Factory for GitConnection instances.</description>
		 	<resource-env-ref-name>git/GitConnectionFactory</resource-env-ref-name>
		 	<resource-env-ref-type>com.jndi.GitConnection</resource-env-ref-type>
		 </resource-env-ref>	 
     </web-app>

    When I load Tomcat, I can see successfully that the resource
git/GitConnectionFactory is registered:

     INFO: Configuring Service(id=git/GitConnectionFactory, type=Resource,
provider-id=ProvidedByTomcat)
06-Apr-2013 17:54:25 org.apache.openejb.assembler.classic.Assembler
createRecipe

As soon as I deploy the application I get the following Exception:

      org.apache.openejb.OpenEJBException: No provider available for
resource-env-ref 'git/GitConnectionFactory' of type 'com.jndi.GitConnection'
for 'i'.

Any ideas where the problem is?



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Ok, I found it:

Resource id is git/GitConnectionFactory. When I undeploy the application, it
works. As soon as I deploy the application, I get the same errors as before:

No provider available for resource-env-ref.

Does this mean that TomEE won't support my problem? Really not sure what to
do.



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662076.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
should be available at 04:30:00 UTC

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> Would you know what time tommorow? We are based in the uk. This is so I can
> organise my time.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662117.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Would you know what time tommorow? We are based in the uk. This is so I can
organise my time.



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662117.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
sources = https://svn.apache.org/repos/asf/tomee/tomee/trunk

see http://tomee.apache.org/dev/source-code.html

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> Do you mean .sources from:
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/openejb/apache-tomee/1.6.0-SNAPSHOT/
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662113.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Do you mean .sources from:
https://repository.apache.org/content/repositories/snapshots/org/apache/openejb/apache-tomee/1.6.0-SNAPSHOT/



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662113.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Tomorrow or build tomee from.sources
Le 8 avr. 2013 17:01, "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>
a écrit :

> When is the next snapshot available?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662110.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
When is the next snapshot available?



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662110.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Thanks. It is working now.



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662125.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
should be

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/9 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> If I download from now:
>
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/openejb/apache-tomee/1.6.0-SNAPSHOT/
>
> Is it this one: apache-tomee-1.6.0-20130409.041014-45-plus.zip Tue Apr 09
> 04:10:20 UTC 2013  46358997
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662123.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
If I download from now:

https://repository.apache.org/content/repositories/snapshots/org/apache/openejb/apache-tomee/1.6.0-SNAPSHOT/

Is it this one: apache-tomee-1.6.0-20130409.041014-45-plus.zip Tue Apr 09
04:10:20 UTC 2013  46358997  



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662123.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
should work on next snapshot https://issues.apache.org/jira/browse/TOMEE-891

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> Here you go:
>
>
> https://github.com/rajivjainnetbuilder2/TomEEExample/tree/master/TomEE-Parent
>
> When you build you need to copy the TomEE-JNDI.jar into the lib folder on
> TomEE. You will see the errors now.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662106.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Here you go:

https://github.com/rajivjainnetbuilder2/TomEEExample/tree/master/TomEE-Parent

When you build you need to copy the TomEE-JNDI.jar into the lib folder on
TomEE. You will see the errors now.



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662106.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
github if possible, or any other public code repository

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> Let me try. Where do you want me to upload the project to?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662090.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Let me try. Where do you want me to upload the project to?



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662090.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
that's it

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> 1) add your resource in tomee/lib is needed to declare it in tomee.xml, no
> need of resource-env-ref by default
>
> You mentioned tomee/lib. This my structure:
>
> apache-tomee-plus-1.5.1/lib. Is this what you mean by tomee/lib or I am
> doing something totally wrong?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662093.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
1) add your resource in tomee/lib is needed to declare it in tomee.xml, no 
need of resource-env-ref by default 

You mentioned tomee/lib. This my structure:

apache-tomee-plus-1.5.1/lib. Is this what you mean by tomee/lib or I am
doing something totally wrong?



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662093.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
basically i don't have time to try to understand what you do ATM

so basically just sare a project organized this way:

parent
|--commonlib (with GitConnection)
`- mywebapp
    |-src/main/tomee/conf
    |         `tomee.xml
    `- pom.xml -- with tomee-maven-plugin

is it possible?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> We using Maven on our side for building applications. But not to start and
> stop the TomEE server. Is this required to show a buildable example? Can't
> I
> just show a written set of tasks to do? That would be better for me. There
> are not many steps at all.
>
> Where should I posts this prove to you?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662087.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
We using Maven on our side for building applications. But not to start and
stop the TomEE server. Is this required to show a buildable example? Can't I
just show a written set of tasks to do? That would be better for me. There
are not many steps at all.

Where should I posts this prove to you?



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662087.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
1) add your resource in tomee/lib is needed to declare it in tomee.xml, no
need of resource-env-ref by default
2) show us with a buildable sample it doesn't work please

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> 1) So from what you are saying I only need to declare this and lookup. No
> jar
> file needs to be placed in the lib folder? No resource-env-ref in web.xml?
>
> How will my attributes and values for example "gitLocation" be detected by
> the container?
>
> 2) Why can't context.xml be used in the same way as Tomcat 7 with TomEE?
>
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662084.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
1) So from what you are saying I only need to declare this and lookup. No jar
file needs to be placed in the lib folder? No resource-env-ref in web.xml?

How will my attributes and values for example "gitLocation" be detected by
the container?

2) Why can't context.xml be used in the same way as Tomcat 7 with TomEE?






--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662084.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
id="git/GitConnection" then lookup using java:openejb/Resource/git/
GitConnection

I don't recall if you can use global names here but i think
(id="java:global/git/GitConnection")

Side note: you don't need anymore the factory if you use tomee.xml

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/8 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> What would you say would the id compared to my example?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662075.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
What would you say would the id compared to my example?



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662075.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
in tomee.xml:

<Resource id="..." class-name="...GitConnection">
  gitLocation = /home/git/...
</Resource>


*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/7 rajiv.jain@netbuilder.com <ra...@netbuilder.com>

> Based on the information you have, if I were to do it your way to define
> JNDI
> resources. Can you give a complete example based on what I have shown you,
> in order to get this working?
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662059.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Based on the information you have, if I were to do it your way to define JNDI
resources. Can you give a complete example based on what I have shown you,
in order to get this working?





--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662059.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Hi

I have tried the same without TomEE Plus. So just Tomcat 7 and it works
perfectly. The problem is with TomEE Plus. What should I do?

We require TomEE.



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662058.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Just tried this. Still same problem. Not sure what to do.



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662057.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

Posted by Romain Manni-Bucau <rm...@gmail.com>.
https://repository.apache.org/content/repositories/snapshots/org/apache/openejb/apache-tomee/1.6.0-SNAPSHOT/
Le 7 avr. 2013 16:03, "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>
a écrit :

> Where can this be downloaded from?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662055.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: TomEE Tomat 7 Resources deployed

Posted by "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>.
Where can this be downloaded from?



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050p4662055.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: TomEE Tomat 7 Resources deployed

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

Did you try the snapshot? (1.6.0-snapshot)
Le 6 avr. 2013 20:18, "rajiv.jain@netbuilder.com" <ra...@netbuilder.com>
a écrit :

> I am using TomEE as the Application Server. TomEE uses Tomcat 7. I have the
> following code:
>
>     package com.jndi;
>
>     import java.util.Hashtable;
>     import javax.naming.Context;
>     import javax.naming.Name;
>     import javax.naming.NamingException;
>     import javax.naming.RefAddr;
>     import javax.naming.Reference;
>     import javax.naming.spi.ObjectFactory;
>
>
>     public class GitObjectFactory implements ObjectFactory {
>
>         public GitObjectFactory() {
>
>         }
>
>         public Object getObjectInstance(Object obj, Name name, Context
> nameCtx,
> Hashtable     environment) throws NamingException {
>                 GitConnection gitConnection = new GitConnection();
>                 // Customize the bean properties from our attributes
>                 Reference ref = (Reference) obj;
>                 RefAddr refAddr = ref.get("gitLocation");
>                 String value = (String) refAddr.getContent();
>                 gitConnection.setGitLocation(value);
>                 return gitConnection;
>         }
>     }
>
>     public class GitConnection {
>
>         private String gitLocation;
>
>         public GitConnection() {
>
>         }
>
>         public String getGitLocation() {
>                 return gitLocation;
>         }
>
>         public void setGitLocation(String gitLocation) {
>                 this.gitLocation = gitLocation;
>         }
>      }
>
>     in context.xml
>     <Context>
>
>
>     <WatchedResource>WEB-INF/web.xml</WatchedResource>
>         <Resource name='git/GitConnectionFactory' auth='Container'
>         type='com.jndi.GitConnection'
>         factory='com.jndi.GitObjectFactory'
>     gitLocation='C:\jGitClone\.git'/>
>
>    in web.xml
>    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
>                  version="2.5">
>
>                  <context-param>
>
>
>                         /WEB-INF/spring/email.xml
>                  </context-param>
>
>                  <listener>
>
>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>                  </listener>
>
>                  <servlet>
>                         <servlet-name>i</servlet-name>
>
>
> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>                         <load-on-startup>1</load-on-startup>
>                  </servlet>
>
>                  <servlet-mapping>
>                         <servlet-name>i</servlet-name>
>                         <url-pattern>/</url-pattern>
>                  </servlet-mapping>
>
>                  <welcome-file-list>
>                         <welcome-file>index.jsp</welcome-file>
>                  </welcome-file-list>
>
>                  <resource-env-ref>
>                         <description>Object Factory for GitConnection
> instances.</description>
>
> <resource-env-ref-name>git/GitConnectionFactory</resource-env-ref-name>
>
> <resource-env-ref-type>com.jndi.GitConnection</resource-env-ref-type>
>                  </resource-env-ref>
>      </web-app>
>
>     When I load Tomcat, I can see successfully that the resource
> git/GitConnectionFactory is registered:
>
>      INFO: Configuring Service(id=git/GitConnectionFactory, type=Resource,
> provider-id=ProvidedByTomcat)
> 06-Apr-2013 17:54:25 org.apache.openejb.assembler.classic.Assembler
> createRecipe
>
> As soon as I deploy the application I get the following Exception:
>
>       org.apache.openejb.OpenEJBException: No provider available for
> resource-env-ref 'git/GitConnectionFactory' of type
> 'com.jndi.GitConnection'
> for 'i'.
>
> Any ideas where the problem is?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/TomEE-Tomat-7-Resources-deployed-tp4662050.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>