NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
davidrpost2
Joined: 22 Mar 2011 Posts: 3
|
Posted: Mon Apr 04, 2011 4:33 pm Post subject: netbeans 6.9.1 can't find ejb in ejb module but its obviosly there |
|
|
netbeans 6.9.1 can't find ejb in ejb module but its obviosly there and the code for it is annotated @Stateful . ejb is not listed under enterprise beans in the projects window and can not be found under insert code->
call enterprise bean.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myPack;
//import statelessPack.*;
import javax.ejb.Stateful;
import javax.ejb.Stateless;
/**
*
* @author David Post
*/
@Stateful
public class MyStatefulBean2 implements MyStatefulBean2Remote,
MyStatefulBean2Local
{
private Integer i = 30;
@Override
public void print2()
{
i++;
for( int j = 0 ; j < 5; j++)
System.out.println(j + " sky " + i) ;
}
@Override
public void print1()
{
for( int j = 0 ; j < 5; j++)
System.out.println(j + " blu " + i) ;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myPack;
import javax.ejb.Remote;
/**
*
* @author David Post
*/
@Remote
public interface MyStatefulBean2Remote
{
public void print2();
public void print1();
} |
|
| Back to top |
|
 |
jyeary
Joined: 21 Oct 2008 Posts: 610 Location: Simpsonville, SC
|
Posted: Tue Apr 05, 2011 2:06 pm Post subject: Re: netbeans 6.9.1 can't find ejb in ejb module but its obviosly there |
|
|
Is the project an EJB Module project? Where are you not seeing it? In the enterprise application listing?
On Mon, Apr 4, 2011 at 12:34 PM, davidrpost2 <address-removed ([email]address-removed[/email])> wrote:
| Quote: | netbeans 6.9.1 can't find ejb in ejb module but its obviosly there and the code for it is annotated @Stateful . ejb is not listed under enterprise beans in the projects window and can not be found under insert code->
call enterprise bean.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myPack;
//import statelessPack.*;
import javax.ejb.Stateful;
import javax.ejb.Stateless;
/**
*
* @author David Post
*/
@Stateful
public class MyStatefulBean2 implements MyStatefulBean2Remote,
MyStatefulBean2Local
{
private Integer i = 30;
@Override
public void print2()
{
i++;
for( int j = 0 ; j < 5; j++)
System.out.println(j + " sky " + i) ;
}
@Override
public void print1()
{
for( int j = 0 ; j < 5; j++)
System.out.println(j + " blu " + i) ;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myPack;
import javax.ejb.Remote;
/**
*
* @author David Post
*/
@Remote
public interface MyStatefulBean2Remote
{
public void print2();
public void print1();
}
------------------------
davidrpost2
|
--
John Yeary
--
http://javaevangelist.blogspot.com
http://www.johnyeary.com
@jyeary
"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat."
-- Theodore Roosevelt |
|
| Back to top |
|
 |
davidrpost2
Joined: 22 Mar 2011 Posts: 3
|
Posted: Wed Apr 06, 2011 4:25 pm Post subject: netbeans can't find ejb |
|
|
| problem happens with ejbs in ejb modules and web applications both standing alone and in enterprise applications. netbeans does not show ejb under enterprise beans in the projects window or under the context menu right-click->insert code->call enterprise bean for dependecy injection. |
|
| Back to top |
|
 |
Tony Posted via mailing list.
|
Posted: Mon Apr 11, 2011 2:37 pm Post subject: Re: netbeans 6.9.1 can't find ejb in ejb module but its obviosly there |
|
|
I don't see a no-args constructor in that class.
Check out the requirements for an EJB.
A simple:
public MyStatefulBean2(){
}
Should work in this case.
Tony
-----Original Message-----
From: davidrpost2 [mailto:address-removed]
Sent: 04 April 2011 17:34
To: address-removed
Subject: [nbj2ee] netbeans 6.9.1 can't find ejb in ejb module but its
obviosly there
netbeans 6.9.1 can't find ejb in ejb module but its obviosly there and the
code for it is annotated @Stateful . ejb is not listed under enterprise
beans in the projects window and can not be found under insert code->
call enterprise bean.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myPack;
//import statelessPack.*;
import javax.ejb.Stateful;
import javax.ejb.Stateless;
/**
*
* @author David Post
*/
@Stateful
public class MyStatefulBean2 implements MyStatefulBean2Remote,
MyStatefulBean2Local
{
private Integer i = 30;
@Override
public void print2()
{
i++;
for( int j = 0 ; j < 5; j++)
System.out.println(j + " sky " + i) ;
}
@Override
public void print1()
{
for( int j = 0 ; j < 5; j++)
System.out.println(j + " blu " + i) ;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myPack;
import javax.ejb.Remote;
/**
*
* @author David Post
*/
@Remote
public interface MyStatefulBean2Remote
{
public void print2();
public void print1();
}
------------------------
davidrpost2 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|