[JBoss-user] Re: CMP relationship across jars with local interfaces?
[EMAIL PROTECTED] (Lars Bjønnes) writes: > Is it possible to define a relationship between two CMP beans across a > jar using local interfaces? Sorry for this lame question. The answer is no, since the spec requires both entities taking part in a relationship to be declared in the same deployment descriptor, and thus in be in the same jar, AFAICS. -- Lars ___ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] CMP relationship across jars with local interfaces?
Is it possible to define a relationship between two CMP beans across a jar using local interfaces? Ie. the CompanyEJB is in company.jar and UserEJB is in user.jar, both deployed in the same app.ear Company.jar/ejb-jar.xml <> Company CompanyEJB CompanyLocalHome CompanyLocal CompanyEJB Container java.lang.String False 2.x Company no description companyId companyId Company-User company-has-users One CompanyaEJB users java.util.Collection user-belongsto-company Many UserEJB beana And then have UserEJB defined as a CMP bean in a different jar? How do I define the 'link'? -- Lars ___ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] passivation exception
"Shawn Chambers" <[EMAIL PROTECTED]> writes: > Hi, > > public void getConnection() throws Exception > { > Hashtable env = new Hashtable(); > env.put(Context.INITIAL_CONTEXT_FACTORY, > "org.jnp.interfaces.NamingContextFactory"); > env.put(Context.PROVIDER_URL, "localhost:1099"); > env.put(Context.URL_PKG_PREFIXES, > "org.jboss.naming:org.jnp.interfaces"); > > dbConnection = > ((DataSource)new InitialContext(env).lookup("java:/InformixDB")) > .getConnection(); > > } Don't hold a reference to the connection in the EJB. Try this: public Connection getConnection() throws Exception { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.PROVIDER_URL, "localhost:1099"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); return ((DataSource)new InitialContext(env).lookup("java:/InformixDB")) .getConnection(); } and use it like this: public void ejbStore() // or load etc. Connection con = null; try { ... con = getConnection(); ... } ... finally { //close connection etc. } Just get the connection when you need it. If this is not an option, try marking the connection member as transient. -- Lars ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] speaking of firewalls
Richard Bottoms <[EMAIL PROTECTED]> writes: > I have an interesting problem. > > On one machine the Apache+Tomcat combo is working great with the fire > located on the same machine. I hope you with 'fire' means firewall. :-) > On machine #1 the tomcat site comes up with just the regular > http://www.site.com URL. > > On machine #2, that site only comes up if http://www.site.com:8080 is > specified. Is Apache and/or mod_jk properly configured on #2 ? -- Lars ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user